Skip to content

Commit

Permalink
Fix CoreLib build when building libraries solutions (dotnet#40097)
Browse files Browse the repository at this point in the history
If a project that is part of solution has a ProjectReference to CoreLib, the Platform property was set to AnyCPU and CoreLib was built with the wrong Platform/Platform_Target.
  • Loading branch information
ViktorHofer authored Jul 29, 2020
1 parent 9dc8384 commit 90f0c93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</ProjectReference>
<ProjectReference Condition="'%(Filename)' == 'System.Private.CoreLib'">
<UndefineProperties>$(UndefineProperties);TargetFramework</UndefineProperties>
<!-- Don't flow TargetFramework and Platform to use same inputs and outputs as the CoreLib's build as part of the runtime. -->
<UndefineProperties>$(UndefineProperties);TargetFramework;Platform</UndefineProperties>
<SetConfiguration Condition="'$(RuntimeFlavor)' == 'CoreCLR' and
'$(Configuration)' != '$(CoreCLRConfiguration)'">Configuration=$(CoreCLRConfiguration)</SetConfiguration>
<SetConfiguration Condition="'$(RuntimeFlavor)' == 'Mono' and
Expand Down

0 comments on commit 90f0c93

Please sign in to comment.