-
Notifications
You must be signed in to change notification settings - Fork 1.4k
RAR BadImageReferenceException needs to log the callstack and exception type #6224
Copy link
Copy link
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.Area: LoggingArea: Task: Resolve Assembly References (RAR)bugneeds-designRequires discussion with the dev team before attempting a fix.Requires discussion with the dev team before attempting a fix.triaged
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Issues impacting the diagnosability of builds, including logging and clearer error messages.Area: LoggingArea: Task: Resolve Assembly References (RAR)bugneeds-designRequires discussion with the dev team before attempting a fix.Requires discussion with the dev team before attempting a fix.triaged