diff --git a/src/dotnet/commands/dotnet-compile-csc/Program.cs b/src/dotnet/commands/dotnet-compile-csc/Program.cs index 9e4a26b29..1f4386119 100644 --- a/src/dotnet/commands/dotnet-compile-csc/Program.cs +++ b/src/dotnet/commands/dotnet-compile-csc/Program.cs @@ -213,9 +213,18 @@ namespace Microsoft.DotNet.Tools.Compiler.Csc commonArgs.Add("-t:library"); } - commonArgs.Add((string.IsNullOrEmpty(options.DebugType) || options.DebugType == "portable") - ? "-debug:portable" - : "-debug:full"); + if (string.IsNullOrEmpty(options.DebugType)) + { + commonArgs.Add(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) + ? "-debug:full" + : "-debug:portable"); + } + else + { + commonArgs.Add(options.DebugType == "portable" + ? "-debug:portable" + : "-debug:full"); + } return commonArgs; }