[xbuild] Fix warning with netstandard projects
authorMikayla Hutchinson <m.j.hutchinson@gmail.com>
Thu, 14 Jul 2016 00:46:35 +0000 (20:46 -0400)
committerMikayla Hutchinson <m.j.hutchinson@gmail.com>
Fri, 15 Jul 2016 17:07:22 +0000 (13:07 -0400)
This fixes an inconsistency where xbuild would add System.Core
references to all builds, and MSBuild would only add them for
.NETFramework.

This change could break user XA/XI/XM projects on Mac if the user has
manually removed the explicit System.Core reference from the project,
however such projects would already be broken on Windows.

mcs/tools/xbuild/data/12.0/Microsoft.Common.targets
mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
mcs/tools/xbuild/data/4.0/Microsoft.Common.targets

index fb80dbc9454704e74412435730aa359801d8154b..6f025debd0b12c781775f77b8296a69a8f549675 100644 (file)
                <_OriginalPlatform>$(Platform)</_OriginalPlatform>
                <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
                <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+       </PropertyGroup>
 
+       <!-- in MSBuild, these properties are set in a separate file that is only imported for .NETFramework -->
+       <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
                <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
                <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
        </PropertyGroup>
index 12ec8ec2393ef4d06b0db7a3bdb72819856a0bcb..be893e94d0c54a003d84f3271a09a5ed681ffe48 100644 (file)
                <_OriginalPlatform>$(Platform)</_OriginalPlatform>
                <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
                <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+       </PropertyGroup>
 
+       <!-- in MSBuild, these properties are set in a separate file that is only imported for .NETFramework -->
+       <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
                <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
                <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
        </PropertyGroup>
index e260aa1ac30524b8efc87db8221f95d80fff60dc..8a8fa9a4d6f0139627dba7a16e17fbf6a06cb64e 100644 (file)
                <_OriginalPlatform>$(Platform)</_OriginalPlatform>
                <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
                <PlatformName Condition="'$(PlatformName)' == ''">$(Platform)</PlatformName>
+       </PropertyGroup>
 
+       <!-- in MSBuild, these properties are set in a separate file that is only imported for .NETFramework -->
+       <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
                <AddAdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == ''">true</AddAdditionalExplicitAssemblyReferences>
                <AdditionalExplicitAssemblyReferences Condition="'$(AddAdditionalExplicitAssemblyReferences)' == 'true' and '$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.0'">System.Core;$(AdditionalExplicitAssemblyReferences)</AdditionalExplicitAssemblyReferences>
        </PropertyGroup>