System.BadImageFormatException: Invalid number of sections declared in PE header.
jamescrosswell opened this issue · 2 comments
jamescrosswell commented
Steps to reproduce
- Create a hello world command line application in dotnet
- Publish the application as a single file
dotnet publish -c Release -p:PublishSingleFile=true
- 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.
Details
- Tried with ILSpy for macOS arm64
- Version ILSpy version 7.2.0.0.rc
- ILSpy 7.2.1.6856 on Windows (obtained from the Microsoft Store) can open the same file without issue... It'd be great to know if there's a way to obtain that same version on macOS (I followed the links in the Readme.md file on this site to get the most recent build for Mac OS).
christophwille commented
You mean AvaloniaILSpy? That should be pretty far behind in terms of such functionality.
jamescrosswell commented
I see. Is there anything more recent available that will build for MacOS?