After https://github.com/mono/mono/pull/4837 was merged the
csproj update bot started sending PRs which hardcoded net_4_x-linux
as the OutputPath.
Updated the csproj generator to detect this and use a variable
in the OutputPath instead. It'll autodetect based on the current OS
and can be overriden by passing /p:HostPlatform=foobar to msbuild.
Ideally we'd have configurations for each platform in the csproj since
in the future the file lists will be different but this is a first step.
class/System.Web.Mvc/System.Web.Mvc/Resources/MvcResources.resources
class/System.Web.Mvc2/System.Web.Mvc/Resources/MvcResources.resources
XmlWriter
-obj-net_4_x
+obj-net_4_x*
obj-bare
obj-plainweb
obj-Facades
obj-plainservice
obj-secxml
obj-mcs-net_4_x
+obj-legacy
<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
else
build_output_dir = "bin\\Debug\\" + library;
+ if (build_output_dir.Contains ("-linux") || build_output_dir.Contains ("-darwin") || build_output_dir.Contains ("-win32"))
+ build_output_dir = build_output_dir
+ .Replace ("-linux", "-$(HostPlatform)")
+ .Replace ("-darwin", "-$(HostPlatform)")
+ .Replace ("-win32", "-$(HostPlatform)");
+
bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build"));
//