ILSpy
ILSpy copied to clipboard
[ILSpyCmd] IlSpy can open, but IlSpyCmd gives "PE file does not contain any managed metadata"
Steps to reproduce
- Run "ilspycmd ModLoaderInstaller-win32.exe_Beware_AutoUpdates.bak" on attached file.
Error message shown
ICSharpCode.Decompiler.Metadata.PEFileNotSupportedException: PE file does not contain any managed metadata.
at ICSharpCode.Decompiler.Metadata.PEFile..ctor(String fileName, PEReader reader, MetadataReaderOptions metadataOptions) in /_/ICSharpCode.Decompiler/Metadata/PEFile.cs:line 70
at ICSharpCode.ILSpyCmd.ILSpyCmdProgram.GetDecompiler(String assemblyFileName) in D:\a\ILSpy\ILSpy\ICSharpCode.ILSpyCmd\IlspyCmdProgram.cs:line 273
at ICSharpCode.ILSpyCmd.ILSpyCmdProgram.Decompile(String assemblyFileName, TextWriter output, String typeName) in D:\a\ILSpy\ILSpy\ICSharpCode.ILSpyCmd\IlspyCmdProgram.cs:line 324
at ICSharpCode.ILSpyCmd.ILSpyCmdProgram.<OnExecuteAsync>g__PerformPerFileAction|53_0(String fileName, <>c__DisplayClass53_0& ) in D:\a\ILSpy\ILSpy\ICSharpCode.ILSpyCmd\IlspyCmdProgram.cs:line 245
at ICSharpCode.ILSpyCmd.ILSpyCmdProgram.OnExecuteAsync(CommandLineApplication app) in D:\a\ILSpy\ILSpy\ICSharpCode.ILSpyCmd\IlspyCmdProgram.cs:line 166
ILSpy does work
-
Steps to reproduce
- open ILSpy
- open the "ModLoaderInstaller-win32.exe_Beware_AutoUpdates.bak" attached file.
Result:
Is able to open and decompile the file. ModLoaderInstaller-win32.exe_Beware_AutoUpdates.bak.zip
Details
- ILSpyCmd Version:
ilspycmd: 8.2.0.7535 ICSharpCode.Decompiler: 8.2.0.7535
- ILSpy Vesion: ILSpy version 8.2.0.7535 .NET version 6.0.26-servicing.23605.8+dc45e96840243b203b13e61952230e225d2aac52
The file could be a DLL, not a .NET executable. You can use a tool like PEiD (Windows) or Detect It Easy (Cross-platform) to check.
Use the latest build from master branch, it is capable of reading this bundle file.
Download can be found here: https://github.com/icsharpcode/ILSpy/actions/runs/9405226877