1

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

starblue
  • 55,348
  • 14
  • 97
  • 151
Kalamro
  • 233
  • 2
  • 3
  • 6

1 Answers1

4
  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.

H H
  • 263,252
  • 30
  • 330
  • 514
  • 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 Sep 03 '10 at 12:18