diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs index 52740045748f..036cc21f146a 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs @@ -78,6 +78,12 @@ public void compose_dependencies() "fluentassertions.json/4.12.0/lib/netstandard1.3/FluentAssertions.Json.dll" }; + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + // https://github.com/dotnet/core-setup/issues/2716 - an unintended native shim is getting published to the runtime store + files_on_disk.Add($"runtime.{_runtimeRid}.runtime.native.system.security.cryptography/1.0.1/runtimes/{_runtimeRid}/native/System.Security.Cryptography.Native{FileConstants.DynamicLibSuffix}"); + } + storeDirectory.Should().OnlyHaveFiles(files_on_disk); } @@ -108,6 +114,12 @@ public void compose_dependencies_noopt() "fluentassertions.json/4.12.0/lib/netstandard1.3/FluentAssertions.Json.dll" }; + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + // https://github.com/dotnet/core-setup/issues/2716 - an unintended native shim is getting published to the runtime store + files_on_disk.Add($"runtime.{_runtimeRid}.runtime.native.system.security.cryptography/1.0.1/runtimes/{_runtimeRid}/native/System.Security.Cryptography.Native{FileConstants.DynamicLibSuffix}"); + } + storeDirectory.Should().OnlyHaveFiles(files_on_disk); } @@ -145,6 +157,12 @@ public void compose_multifile() "fluentassertions.json/4.12.0/lib/netstandard1.3/FluentAssertions.Json.dll", }; + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + // https://github.com/dotnet/core-setup/issues/2716 - an unintended native shim is getting published to the runtime store + files_on_disk.Add($"runtime.{_runtimeRid}.runtime.native.system.security.cryptography/1.0.1/runtimes/{_runtimeRid}/native/System.Security.Cryptography.Native{FileConstants.DynamicLibSuffix}"); + } + storeDirectory.Should().OnlyHaveFiles(files_on_disk); var knownpackage = new HashSet