Skip to content

Instantly share code, notes, and snippets.

@patricksuo
Created July 25, 2017 10:04
Show Gist options
  • Save patricksuo/3cdcec7ab0c6bc098bdd06534bcf4cec to your computer and use it in GitHub Desktop.
Save patricksuo/3cdcec7ab0c6bc098bdd06534bcf4cec to your computer and use it in GitHub Desktop.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<DefineConstants Condition="'$(OS)' == 'Windows_NT'">AAA;IS_WIN </DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Core'">
<DefineConstants Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">AAA;IS_OSX</DefineConstants>
<DefineConstants Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">AAA;IS_LINUX</DefineConstants>
</PropertyGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment