always create a pdb, dotnet-build crash if not found

a `noPdb` options doesnt exists in project.json, a pdb is required as compile output
This commit is contained in:
Enrico Sada 2016-02-08 11:12:30 +01:00
parent e8e3f7c78f
commit 19a66849a4

View file

@ -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<byte>());
}
return result.ExitCode;
}