dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.21k stars 1.35k forks source link

Rethink unhandled-exception catchall message from "please open a bug against msbuild" #382

Open nguyenm100 opened 8 years ago

nguyenm100 commented 8 years ago

Trying to build corefx for the first time (running build.sh)

Restoring NuGet.exe... Restoring MSBuild... Attempting to resolve dependency 'Microsoft.Tpl.Dataflow (≥ 4.5.24)'. Installing 'Microsoft.Tpl.Dataflow 4.5.24'. Successfully installed 'Microsoft.Tpl.Dataflow 4.5.24'. Installing 'Microsoft.Build.Mono.Debug 14.1.0.0-prerelease'. Successfully installed 'Microsoft.Build.Mono.Debug 14.1.0.0-prerelease'. Invalid type Microsoft.Build.Execution.BuildManager for instance field Microsoft.Build.Execution.BuildSubmission:k__BackingField MSBUILD : error MSB1025: An internal failure occurred while running MSBuild. System.TypeLoadException: A type load exception has occurred. at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00000] in :0 This is an unhandled exception in MSBuild Engine -- PLEASE OPEN A BUG AGAINST THE MSBUILD TEAM. System.TypeLoadException: A type load exception has occurred. at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00000] in :0

Unhandled Exception: System.TypeLoadException: A type load exception has occurred. at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: A type load exception has occurred. at Microsoft.Build.CommandLine.MSBuildApp.Execute (System.String commandLine) [0x00000] in :0

tail: cannot open ‘/home/mnguyen/src/corefx/msbuild.log’ for reading: No such file or directory Build Exit Code = 1


uname -a Linux TOKYO 3.19.0-33-generic #38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Active Version Runtime Architecture OperatingSystem Alias


rainersigwald commented 8 years ago

@nguyenm100 What version of mono are you using?

nguyenm100 commented 8 years ago

Yes that was the issue. Perhaps a better error message?

rainersigwald commented 8 years ago

I think this message is left over from long ago, when we supported only one runtime and therefore had higher confidence that such an error was our fault rather than that of the runtime. I agree that we should think about changing it. I'll change the title of this bug.

jzabroski commented 3 years ago

This appears to still be broken but only triggers if the user is running in DEBUG mode. https://github.com/dotnet/msbuild/blame/da900e2a6d7109e973f9eb712b4afdb456610c9b/src/MSBuild/XMake.cs#L825

However, I just filed an issue with MSBuildLocator (I think that is where the bug is) for a TypeLoadException that might be best logged better here as well. See: https://github.com/microsoft/MSBuildLocator/issues/126