Fix Platform setting in mono nuget Directory.Build.props (#32491)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 18 Feb 2020 18:56:44 +0000 (19:56 +0100)
committerGitHub <noreply@github.com>
Tue, 18 Feb 2020 18:56:44 +0000 (19:56 +0100)
Otherwise doing `./mono.sh -pack` didn't work since it'd use amd64 instead of x64.
We copied much of this logic from coreclr so I assume this is specific to their build, but I still don't fully understand every bit.

src/mono/netcore/nuget/Directory.Build.props

index 778b94b..662c5d5 100644 (file)
     <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
     <BuildRID Include="$(PackageRID)"
               Condition="'$(_isSupportedOSGroup)' == 'true'">
-      <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
+      <Platform Condition="'$(ArchGroup)' == 'x64'">x64</Platform>
       <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
     </BuildRID>
   </ItemGroup>
 
   <ItemGroup>
     <_project Include="@(BuildRID)">
-      <Platform Condition="'%(Platform)' == ''">amd64</Platform>
+      <Platform Condition="'%(Platform)' == ''">x64</Platform>
       <PackageTargetRuntime>%(Identity)</PackageTargetRuntime>
       <AdditionalProperties>PackageTargetRuntime=%(Identity);Platform=%(Platform)</AdditionalProperties>
     </_project>