Skip to content

RAR BadImageReferenceException needs to log the callstack and exception type #6224

@KirillOsenkov

Description

@KirillOsenkov

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions