Click here to Skip to main content
15,917,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i compile console or windows application i got exe file.
Now my question is that:
1>Is this file is Assembly which contains IL code>
2>Is this file called as .net PE files?
3>Is this is PE file consists of IL code as its part?
Posted

1 solution

The EXE file contains the IL Code (and some other support gubbins)
The framework is called to run your app when the EXE is executed (via the support gubbins) and the JIT compiler converts it into code that is directly executable by the real processor, as the program is running.

The EXE file is a type of PE file, as is a .NET DLL - they are both executable and share a similar structure, so yes, the PE file contains IL code.

But you will not find a file called "myApp.PE" at any time!

There is a good explanation of the execution process here: http://www.mastercsharp.com/article/90/exploring-your-first-c-application-hello-world[^] - it's about a third of the way down the page.
 
Share this answer
 
Comments
fdiu 27-Oct-12 3:55am    
JIT compiler converts IL into code that is directly executable by the real processor, as the program is running.
But where this native code found?
OriginalGriff 27-Oct-12 3:59am    
In memory - it does not get converted into a disk file. That is what the "Just-In-Time" part of the JIT compiler is all about. The actual IL gets converted into native code for the duration of the application execution only - and even then only the bits that are executed (or likely to be executed) and even these may not be kept for the whole duration of the application execution.

Each time you run your program, the same process happens - a native code file is never generated.
fdiu 27-Oct-12 4:02am    
okThen what about the asp.net application assemblies are once compiled then is they are stored on disk?
OriginalGriff 27-Oct-12 4:06am    
No.
fdiu 27-Oct-12 4:15am    
Thank you ..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900