Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Bad Image format

$
0
0

Hi guyz

When I compiled ILASM Code to exe file My code is

.method static void main()
{
    .entrypoint
    .maxstack 1

    ldstr "Hello world!"
    call void [mscorlib]System.Console::WriteLine(string)

    ret
}

I used commandline from Visual Studio Command Prompt "ilasm myfile"

It generates EXE file but when I execute it i get this error


Unhandled Exception: System.BadImageFormatException: Could not load file or asse
mbly 'code.exe' or one of its dependencies. The module was expected to contain a
n assembly manifest.

Can you please help me why i am getting this error. Because i am new to ILASM


---------------------Do the Impossible--------------------- Great Software at http://atosoft.webs.com/


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>