C# Tutorial - Compilation and Execution ModelIn order to give a better overview of how the .NET Framework operates, we can take a look at how a .NET application is created and run on a Microsoft operating system. Step 1Application code is written in a .NET compatible language such as C#. This can take the form of one or many source files that contain statements written in the C# language. When using an IDE, the source files form part of a project which in turn forms part of a solution. ![]() The code in the source files is compiled into Intermediate Language code and metadata with the compiler. These are stored in an assembly with the extension ".exe" or ".dll". When more than one source file is used, the compiler also links the code together in order to compile it. ![]() Before the code can be executed, the assembly must first be compiled into native code the run on the target platform. This is done using a Just-In-Time compiler that forms part of the implementation of the CLI such as the .NET Framework. ![]() The native code is executed within the Virtual Execution System of the implementation of the CLI such as the .NET Framework CLR alongside any other .NET applications. ![]()
|