Skip to content

[ILSpyCmd] IlSpy can open, but IlSpyCmd gives "PE file does not contain any managed metadata" #3154

Description

@NBKRedSpy

Steps to reproduce

  1. 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

  1. open ILSpy
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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