-
Porting MSBuild Projects To XBuild
<NuGetCommand Condition=" '$(NuGetCommand)'=='' AND '$(OS)' == 'Windows_NT'">"$(NuGetExe)"</NuGetCommand> <NuGetCommand Condition=" '$(NuGetCommand)'=='' AND '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 "$(NuGetExe)"</NuGetCommand>
-
Cross Platform Builds on Windows and Mono with MSBuild
<Reference Include="Windows.Specific.dll" Condition=" '$(OS)' != 'Unix' "/> <Reference Include="NonWindows.Specific.dll" Condition=" '$(OS)' == 'Unix' "/>
MSBuildshas:$(OS)->OSX/Unix/Windows_NTEDIT!!OSXseem to have been removed recently: dotnet/msbuild#538xbuildonly has:$(OS)->Unix/Windows_NT, on Mac it also evaluates toUnix
[RFC] Detecting current OS in targets:
MSBuild sets the
$(OS)property toOSX/Unix/Windowsat runtime, which can be used in targets to determine the current OS. But xbuild has been using$(OS)==Unixon OSX and Linux, because of an old mono bug. And it continues to do so for compatibility reasons.