ILSpy icon indicating copy to clipboard operation
ILSpy copied to clipboard

Assembly could not be loaded

Open giggioman00 opened this issue 5 years ago • 3 comments

// C:\***\***.exe
// PE file does not contain any managed metadata.

ICSharpCode.Decompiler.Metadata.PEFileNotSupportedException: PE file does not contain any managed metadata.
   in ICSharpCode.Decompiler.Metadata.PEFile..ctor(String fileName, PEReader reader, MetadataReaderOptions metadataOptions)
   in ICSharpCode.ILSpy.LoadedAssembly.LoadAssembly(Object state)
   in System.Threading.Tasks.Task`1.InnerInvoke()
   in System.Threading.Tasks.Task.Execute()

what can I do? I get the warning in the title, and the premius quote is the detailed errors

giggioman00 avatar Aug 13 '19 01:08 giggioman00

Seems like this assembly was not created using a compiler for managed programming languages (C#, F#, VB.NET, etc.) ILSpy cannot read unmanaged binaries. You will have to use a decompiler/diassembler for native code instead.

Idea: we could display more information from the PE Header(s) to make it easier to differentiate corrupted managed assemblies from pure native binaries.

siegfriedpammer avatar Aug 13 '19 07:08 siegfriedpammer

I ran into a similar issue today when trying to decompile a Xamarin app and someone actually solved it.

You can run a smally python script to decompress the DLL.

Source: Decompressing Xamarin DLLs

Techbrunch avatar Mar 31 '21 20:03 Techbrunch

i have extracted apk but do not find assembly files , only meta data file but when i drag and drop that meta deta into llspy it throws this error image

AgentSamad avatar Jul 13 '22 07:07 AgentSamad