Remove dependency on a custom task to detect when compiling on macOS (#1987)

MSBuild.IsOSPlatform is new to MSBuild 15.3 and can be used to determine when we are building on macOS.
This commit is contained in:
Nate McMaster 2017-08-09 16:48:02 -07:00 committed by GitHub
parent 659fa967a1
commit d3fb5e76f1
1 changed files with 1 additions and 11 deletions

View File

@ -7,6 +7,7 @@
<RootNamespace>Microsoft.AspNetCore.Server.Kestrel.FunctionalTests</RootNamespace>
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
<DefineConstants Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(DefineConstants);MACOS</DefineConstants>
<ServerGarbageCollection>true</ServerGarbageCollection>
<!--
@ -42,15 +43,4 @@
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
</ItemGroup>
<Target Name="DefinePlatformConstants" BeforeTargets="CoreCompile">
<Sdk_GetOSPlatform>
<!-- Returns {Linux, macOS, Windows} -->
<Output TaskParameter="PlatformName" PropertyName="OSPlatform" />
</Sdk_GetOSPlatform>
<PropertyGroup>
<DefineConstants>$(DefineConstants);$(OSPlatform.ToUpperInvariant())</DefineConstants>
</PropertyGroup>
</Target>
</Project>