Closed KirillOsenkov closed 7 years ago
Cecil throws a BadImageFormatException
when it encounters a native library (CLI Header is empty). Maybe we should catch that, and log the assembly not being loaded.
Ideally avoid the exception in the first place (I bet Cecil has ways to probe)
Doesn't look like it does, but this is part of parsing the metadata of a given dll file, so we can safely just catch that exception.
@jbevain Jb is there a way to detect a native binary in Cecil and avoid throwing an exception?
Here's how I normally do it: https://github.com/KirillOsenkov/SourceBrowser/blob/master/src/Common/IsManagedAssembly.cs
Closing as https://github.com/mono/mono-addins/pull/63 was merged.
Mono Addins crashes when encountering a native binary that's not excluded. Maybe it should instead skip it silently?