Skip to content

Commit d992386

Browse files
committed
Revert removal of workaround
Probably the change to not prune packages if there are no FrameworkReferences reverted this to the old behavior
1 parent 10e515d commit d992386

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ public void compose_dependencies()
7878
"fluentassertions.json/4.12.0/lib/netstandard1.3/FluentAssertions.Json.dll"
7979
};
8080

81+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
82+
{
83+
// https://github.com/dotnet/core-setup/issues/2716 - an unintended native shim is getting published to the runtime store
84+
files_on_disk.Add($"runtime.{_runtimeRid}.runtime.native.system.security.cryptography/1.0.1/runtimes/{_runtimeRid}/native/System.Security.Cryptography.Native{FileConstants.DynamicLibSuffix}");
85+
}
86+
8187
storeDirectory.Should().OnlyHaveFiles(files_on_disk);
8288
}
8389

@@ -108,6 +114,12 @@ public void compose_dependencies_noopt()
108114
"fluentassertions.json/4.12.0/lib/netstandard1.3/FluentAssertions.Json.dll"
109115
};
110116

117+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
118+
{
119+
// https://github.com/dotnet/core-setup/issues/2716 - an unintended native shim is getting published to the runtime store
120+
files_on_disk.Add($"runtime.{_runtimeRid}.runtime.native.system.security.cryptography/1.0.1/runtimes/{_runtimeRid}/native/System.Security.Cryptography.Native{FileConstants.DynamicLibSuffix}");
121+
}
122+
111123
storeDirectory.Should().OnlyHaveFiles(files_on_disk);
112124
}
113125

@@ -145,6 +157,12 @@ public void compose_multifile()
145157
"fluentassertions.json/4.12.0/lib/netstandard1.3/FluentAssertions.Json.dll",
146158
};
147159

160+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
161+
{
162+
// https://github.com/dotnet/core-setup/issues/2716 - an unintended native shim is getting published to the runtime store
163+
files_on_disk.Add($"runtime.{_runtimeRid}.runtime.native.system.security.cryptography/1.0.1/runtimes/{_runtimeRid}/native/System.Security.Cryptography.Native{FileConstants.DynamicLibSuffix}");
164+
}
165+
148166
storeDirectory.Should().OnlyHaveFiles(files_on_disk);
149167

150168
var knownpackage = new HashSet<PackageIdentity>

0 commit comments

Comments
 (0)