msbuild: RAR BadImageReferenceException needs to log the callstack and exception type
I’m investigating a build with this warning from RAR:
/Users/builder/azdo/_work/1/s/main/build/tools/MSBuild/bin/Microsoft.Common.CurrentVersion.targets(2143,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible.
This exception is thrown in four places: https://source.dot.net/#Microsoft.Build.Tasks.Core/AssemblyDependency/BadImageReferenceException.cs,cbeccdcba5e80a17,references
It could be a BadImageFormatException
, FileNotFoundException
, FileLoadException
or any other IORelated exception. We throw away the callstack and don’t display the type of the underlying exception. We should print the original exception ToString() not just the Message.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (15 by maintainers)
I guess I meant log the error with the messages, and immediately follow with a low importance message event with the ToString(), perhaps.