views:

41

answers:

1

Hi, I was trying to find some simple overview but found nothing. So I hope someone will help me here. I would like to know what is the flow of compilation/assembly process in .NET. I just know:

1)The code is compiled into CIL
2)
3)
...
4) Executable binaries

+2  A: 
  1. Your C#/VB.NET/... code is compiled to MSIL (CIL)
  2. The MSIL is stored in an assembly (.DLL / .EXE)
  3. .NET Assemblies are executed by the CLR (.NET runtime)
  4. When an assembly is 'loaded' that means its code is loaded-on-demand
  5. When the CLR loads a MSIL method it is compiled to native code
  6. The native code is executed but not stored on disk

There exists a tool NGEN.exe to pre-compile the MSIL but it is only used in special cases.

Henk Holterman
Thanks, that is exactly what I needed :)
Kalamro
@Henk Holterman , could I ask you for adding the explanation of the following to your list? EDIT:I think I got it. The MSIL is stored as a stored code and it is compiled into native code by the CLR.
Kalamro