Fix generation of Crossgen2 zips (#34971)
authorDavid Wrighton <davidwr@microsoft.com>
Tue, 28 Apr 2020 02:09:05 +0000 (19:09 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Apr 2020 02:09:05 +0000 (19:09 -0700)
The compressed crossgen2 zip file being created in the current builds are almost empty except for the license details. This fixes the problem by passing the right values into the installer project creation path, as well as setting the RuntimeIdentifier property as needed.

eng/pipelines/installer/jobs/steps/build-linux-package.yml
src/installer/Directory.Build.props
src/installer/pkg/packaging/installers.proj

index e9e342b..3742e33 100644 (file)
@@ -32,5 +32,6 @@ steps:
       ${{ parameters.packagingArgs }} \
       $(CommonMSBuildArgs) \
       ${{ parameters.outputRidArg }} \
+      $(LiveOverridePathArgs) \
       /bl:artifacts/log/$(_BuildConfig)/msbuild.${{ parameters.distroRid }}.installers.binlog
   displayName: Package ${{ parameters.packageStepDescription }} - ${{ parameters.distroRid }}
index b27aac5..5bd3158 100644 (file)
     <OutputRid Condition="'$(TargetOS)' == 'Browser'">browser-$(TargetArchitecture)</OutputRid>
   </PropertyGroup>
 
+  <PropertyGroup Condition="'$(RuntimeIdentifier)' == '' and '$(EnsureRuntimeIdentifierSet)' == 'true'">
+    <RuntimeIdentifier>$(OutputRid)</RuntimeIdentifier>
+  </PropertyGroup>
+
   <PropertyGroup>
     <TestTargetRid Condition="'$(TestTargetRid)' == ''">$(OutputRid)</TestTargetRid>
   </PropertyGroup>
index cfe1bdf..2e81105 100644 (file)
@@ -1,5 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <!-- RuntimeIdentifier must be set or CoreCLRCrossgen2Dir does not get set properly. -->
+    <EnsureRuntimeIdentifierSet>true</EnsureRuntimeIdentifierSet>
+  </PropertyGroup>
   <Import Project="Directory.Build.props" />
   <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
 
     
     <!-- copy crossgen2 -->
     <ItemGroup>
-      <Crossgen2Files Include="$(CoreCLRCrossgen2Dir)\*" />
+      <Crossgen2Files Include="$(CoreCLRCrossgen2Dir)*" />
       <Crossgen2Files Include="$(RepoRoot)THIRD-PARTY-NOTICES.TXT" />
       <Crossgen2Files Include="$(RepoRoot)LICENSE.TXT" />
     </ItemGroup>
+
     <Copy Sourcefiles="@(Crossgen2Files)"
           DestinationFolder="$(Crossgen2PublishRoot)%(Crossgen2Files.RecursiveDir)" />