Fix framework assembly deployment for CoreCLR (dotnet/core-setup#2800)
authorSimon Nattress <nattress@gmail.com>
Fri, 7 Jul 2017 19:07:31 +0000 (12:07 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Jul 2017 19:07:31 +0000 (12:07 -0700)
Before NS2.0, the framework assemblies were drawn from a variety of
individual Nuget packages. Filtering was performed to not copy a Nuget
package's contents if it was the CoreCLR runtime package, since that is
provided by an AppX package dependency. The test for "is this a CoreCLR
runtime package" was the presence of mscorlib.[ni.]dll. With NS2.0,
mscorlib is just a type forwarder in the main framework assembly payload
so the filter broke. Instead, use System.Private.CoreLib.[ni.]dll which is
now present in the CoreCLR runtime package. CoreCLR NS2.0 runtime Nuget
packages will similarly contain System.Private.CoreLib.dll.

Commit migrated from https://github.com/dotnet/core-setup/commit/e7380231460ac20a925c336a88a1340fb4bd08bb

src/installer/pkg/projects/Microsoft.Net.UWPCoreRuntimeSdk/contents/identity/Microsoft.Net.CoreRuntime.targets

index a0126ef..d5d6c02 100644 (file)
@@ -214,7 +214,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
   <!-- We will always inject the CLR from the framework SDK, so remove it if it was contributed through NuGet -->
   <Target Name="FilterCoreRuntimePayloadFromNuGet" AfterTargets="ResolveReferences" DependsOnTargets="ResolveNuGetPackageAssets" Condition="'$(ResolveNuGetPackages)' == 'true' AND '$(_TargetsCoreRuntime)' == 'true'">
     <PropertyGroup>
-      <_CoreRuntimePackageId Condition="'%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'mscorlib.dll' OR '%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'mscorlib.ni.dll'">%(ReferenceCopyLocalPaths.NuGetPackageId)</_CoreRuntimePackageId>
+      <_CoreRuntimePackageId Condition="'%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'System.Private.CoreLib.dll' OR '%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'System.Private.CoreLib.ni.dll'">%(ReferenceCopyLocalPaths.NuGetPackageId)</_CoreRuntimePackageId>
     </PropertyGroup>
     <ItemGroup>
       <ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'$(UseAppLocalCoreCLR)' != 'true' AND '%(ReferenceCopyLocalPaths.NuGetPackageId)' == '$(_CoreRuntimePackageId)' AND '$(_CoreRuntimePackageId)' != ''"/>