How a .NET application is Executed?

.NET framework is most popular for build different kind of windows application. In this post, we will explain how a .NET application is executed.

The way .NET applications are executed is a little bit different. The below diagram shows how a .NET application is executed.

How .NET Application is executed

    1. The .Net framework supports many languages(C#, VB.NET, C++/CLI,F# etc.) to write code and develop application.
    2. Once the application is ready. The respective compiler compiles the source code and converts it into Microsoft Intermediate Language (MSIL) code packaged into an assembly with .dll or .exe extension depending upon the application type.
    3. The produced assembly is loaded into the CLR to execute it. CLR is the runtime execution engine that handles running apps. It works as a layer between Operating Systems and the applications written in .NET languages. A process within CLR known as just-in-complier (JIT) converts compiled code into machine understandable code which the computer’s CPU then executes.
    4. When we close the application, the generate machine code is thrown away from the memory. Every time we run the application, the JIT compiles the MSIL code to machine code and executed by the CPU and present in the memory as long as the application is active and running.


Apart from converting Intermediate Language code to native code, CLR run-time engine comes with set of services:

  • Memory Management
  • Thread Management
  • Type Checker
  • Exception Manager
  • Debug Manager
  • COM marshalled
  • Garbage Collector
  • Security

If you have any query then please comment below and let us know. If you liked this article, then please follow us on Facebook to get notification for new posts.

Happy Learning 🙂

Rakesh is a programming Geek, technology enthusiast, a passionate writer, thinker with passion for computer programming.  He loves to explore technology and finds ultimate joy when writing about trending technology, geek stuff and web development.