icsharpcode / AvaloniaILSpy

Avalonia-based .NET Decompiler (port of ILSpy)
1.5k stars 169 forks source link

System.BadImageFormatException: Invalid number of sections declared in PE header. #134

Open jamescrosswell opened 1 year ago

jamescrosswell commented 1 year ago

Steps to reproduce

  1. Create a hello world command line application in dotnet
  2. Publish the application as a single file dotnet publish -c Release -p:PublishSingleFile=true
  3. Try to open the resulting executable in ILSpy... it won't let you (it only let's you open dlls)... but you can rename it to a dll and then open it (or run ilspycmd which let's you specify any file, regardless of the extension)

Error message shown

System.BadImageFormatException: Invalid number of sections declared in PE header.

image

Details

christophwille commented 1 year ago

You mean AvaloniaILSpy? That should be pretty far behind in terms of such functionality.

jamescrosswell commented 1 year ago

I see. Is there anything more recent available that will build for MacOS?