diff --git a/src/dotnet/commands/dotnet-compile-fsc/Program.cs b/src/dotnet/commands/dotnet-compile-fsc/Program.cs index 9f907407a..0dd36f998 100644 --- a/src/dotnet/commands/dotnet-compile-fsc/Program.cs +++ b/src/dotnet/commands/dotnet-compile-fsc/Program.cs @@ -134,6 +134,13 @@ namespace Microsoft.DotNet.Tools.Compiler.Fsc File.Move(outputName, originalOutputName); } + //HACK dotnet build require a pdb (crash without), fsc atm cant generate a portable pdb, so an empty pdb is created + string pdbPath = Path.ChangeExtension(outputName, ".pdb"); + if (!File.Exists(pdbPath)) + { + File.WriteAllBytes(pdbPath, Array.Empty()); + } + return result.ExitCode; }