[csproj] Update generator to handle platform-specific assemblies (#4847)
[mono.git] / msvc / scripts / csproj.tmpl
index 02ef2e45743d279ddbe795a9c3cb20ce3334647c..1b2e850e5e3330287beaf5c14cbcf1efaf54ff79 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
@@ -8,6 +9,9 @@
     <ProjectGuid>@PROJECTGUID@</ProjectGuid>\r
     <OutputType>@OUTPUTTYPE@</OutputType>\r
     <NoWarn>@DISABLEDWARNINGS@</NoWarn>\r
+    <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>\r
+    <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>\r
+    <HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>\r
     <OutputPath>@OUTPUTDIR@</OutputPath>\r
     <IntermediateOutputPath>obj-@OUTPUTSUFFIX@</IntermediateOutputPath>\r
     <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r