From: Ankit Jain Date: Fri, 3 Feb 2017 12:19:05 +0000 (-0500) Subject: [xbuild] Disable pre-2.0 csc hack to use /debug:portable (#4322) X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=5e27431a9ac461f52e12e3162cb9f93cbf71f3ea [xbuild] Disable pre-2.0 csc hack to use /debug:portable (#4322) This hack should not be required now, as roslyn emits the correct debug files with /debug:full and /debug:pdbonly, on non-windows platform. This manifested as https://bugzilla.xamarin.com/show_bug.cgi?id=50710 , where the Xamarin.Mac targets override `$(CscToolExe)` to use `mcs`, but xbuild's `ManagedCompiler` *always* converts `DebugType={full,pdbonly}` to `/debug:portable`, which would cause mcs to complain. --- diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs index 19eec868654..9d6404ee3eb 100644 --- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs +++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ManagedCompiler.cs @@ -58,11 +58,7 @@ namespace Microsoft.Build.Tasks { if (Bag ["CodePage"] != null) commandLine.AppendSwitchIfNotNull ("/codepage:", CodePage.ToString ()); - var dtype = DebugType; - if (string.Equals (dtype, "full", StringComparison.OrdinalIgnoreCase) || string.Equals (dtype, "pdbonly", StringComparison.OrdinalIgnoreCase)) - dtype = "portable"; - - commandLine.AppendSwitchIfNotNull ("/debug:", dtype); + commandLine.AppendSwitchIfNotNull ("/debug:", DebugType); if (Bag ["DelaySign"] != null) if (DelaySign)