[csproj] Update generator to handle platform-specific assemblies (#4847)
[mono.git] / msvc / scripts / csproj.tmpl
index 16fab9278c9f10c81333841b7e59a80e61542c83..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
@@ -6,10 +7,16 @@
     <ProductVersion>9.0.30729</ProductVersion>\r
     <SchemaVersion>2.0</SchemaVersion>\r
     <ProjectGuid>@PROJECTGUID@</ProjectGuid>\r
-    <OutputType>Library</OutputType>\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
     @NOSTDLIB@\r
+    @STARTUPOBJECT@\r
     @NOCONFIG@\r
     @ALLOWUNSAFE@\r
     <AppDesignerFolder>Properties</AppDesignerFolder>\r