Don't include hostfxr or hostpolicy in the platform manifest. (#46342)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Tue, 22 Dec 2020 23:52:11 +0000 (15:52 -0800)
committerGitHub <noreply@github.com>
Tue, 22 Dec 2020 23:52:11 +0000 (15:52 -0800)
src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj

index b72203c..a9e0a9e 100644 (file)
     <PlatformManifestFileEntry Include="createdump.exe" IsNative="true" />
     <PlatformManifestFileEntry Include="createdump" IsNative="true" />
     <PlatformManifestFileEntry Include="libcoreclrtraceptprovider.so" IsNative="true" />
-    <PlatformManifestFileEntry Include="hostpolicy.dll" IsNative="true" />
-    <PlatformManifestFileEntry Include="libhostpolicy.so" IsNative="true" />
-    <PlatformManifestFileEntry Include="libhostpolicy.dylib" IsNative="true" />
-    <PlatformManifestFileEntry Include="hostfxr.dll" IsNative="true" />
-    <PlatformManifestFileEntry Include="libhostfxr.so" IsNative="true" />
-    <PlatformManifestFileEntry Include="libhostfxr.dylib" IsNative="true" />
     <PlatformManifestFileEntry Include="Microsoft.DiaSymReader.Native.x86.dll" IsNative="true" FallbackFileVersion="$(MicrosoftDiaSymReaderNativeFileVersion)" />
     <PlatformManifestFileEntry Include="Microsoft.DiaSymReader.Native.amd64.dll" IsNative="true" FallbackFileVersion="$(MicrosoftDiaSymReaderNativeFileVersion)" />
     <PlatformManifestFileEntry Include="Microsoft.DiaSymReader.Native.arm.dll" IsNative="true" FallbackFileVersion="$(MicrosoftDiaSymReaderNativeFileVersion)" />
index 4a5df90..bb13901 100644 (file)
     <OverridePackageId>$(SharedFrameworkName).Runtime.$(RuntimeSpecificFrameworkSuffix).$(RuntimeIdentifier)</OverridePackageId>
   </PropertyGroup>
 
+  <!-- 
+    hostpolicy and hostfxr aren't in the platform manifest in the ref pack and cannot be without breaking things upstack.
+    We add the entries here to ensure that we don't fail the validation that every file included in the runtime pack is in the platform manifest
+    without adding the entries to the manifest in the ref pack.
+  -->
+  <ItemGroup>
+    <PlatformManifestFileEntry Include="hostpolicy.dll" IsNative="true" />
+    <PlatformManifestFileEntry Include="libhostpolicy.so" IsNative="true" />
+    <PlatformManifestFileEntry Include="libhostpolicy.dylib" IsNative="true" />
+    <PlatformManifestFileEntry Include="hostfxr.dll" IsNative="true" />
+    <PlatformManifestFileEntry Include="libhostfxr.so" IsNative="true" />
+    <PlatformManifestFileEntry Include="libhostfxr.dylib" IsNative="true" />
+  </ItemGroup>
+
   <Target Name="AddLinuxPackageInformation" BeforeTargets="GetDebInstallerJsonProperties;GetRpmInstallerJsonProperties">
     <ItemGroup>
       <LinuxPackageDependency Include="dotnet-hostfxr-$(MajorVersion).$(MinorVersion);dotnet-runtime-deps-$(MajorVersion).$(MinorVersion)" Version="$(InstallerPackageVersion)" />