Search
Close this search box.

.NET Framework Compilation Process

With this thread i am trying to brief about the compilation process of .NET framework. What will happen from the stage of writing code, compiling and executing the application. 

Compilation Process:

When any application is written targeting .net framework, the code will get compiled with respective compiler (say csc compiler OR  vb compiler), based on whether we are using C# as a language or VB. After compilation of the code, what we get is an IL Assembly (Intermediate Language Assembly) later which will be converted into IL Code Or Byte Code (Intermediate Language Code). The process of converting IL Assembly to IL Code will be done with the help of two tools they are ilasm.exe and MetaEngine . The .exe or .dll file what we get contains IL Code, later which will converted in to native code.

Where ilasm.exe converts IL Assembly to MSIL Code, meanwhile MetaEngine creates a metadata for the IL Assembly. Hence, once source code is compiled the IL code generated contains metadata as well as  Intermediate format code.

Any .exe generated for the code written contains IL code. When this .exe is executed on any system which has .NET Framework, then IL Code will be converted in to native code (Machine understandable code). The Process of Converting IL Code to native code will be done with the help of JIT compiler(Just-In-Time Compiler).

JIT will be present at CLR(Common Language Runtime) level.

For better understanding purpose, i am giving pictorial representation.

Thanks!

This article is part of the GWB Archives. Original Author: Developers Friendly

Related Posts