Updated: July 13, 2020 (September 17, 2001)
Charts & IllustrationsDeveloping and Executing Managed Code
Developers create and run managed code using .NET programming language compilers, the Common Language Runtime (CLR), and the Class Libraries.
A compiler starts the process by translating application source code into Microsoft Intermediate Language (MSIL) code and “metadata,” which is additional descriptive information that documents the data and components the managed code defines or requires. A published set of rules called the Common Language Specification (CLS) defines the MSIL and metadata formats. Both Microsoft and third parties have created CLS-compatible languages, such as Managed C++, C# (pronounced “C-sharp”), VB.NET, and COBOL.NET.
An assembly generation tool (either packaged separately or as part of an Integrated Development Environment [IDE] like Visual Studio.NET) collects the MSIL code and metadata into a logical package called an assembly. The assembly includes a manifest that describes its contents, just as the metadata describes the contents of the MSIL code.
The CLR then executes the application. A CLR subsystem called a class loader first uses the information in the metadata and assembly manifest to locate the correct version of all the components it needs. A verifier then checks the code to ensure that the managed code will not fail because it tries to perform some invalid operation, such as using an integer for a function pointer. Once verification is complete, a Just in Time (JIT) compiler converts the MSIL code to native code that the OS can execute; the JIT compiler can also cache the resulting native code to avoid this step when the application runs in the future. Finally, the CLR manages the execution of the code, performing such tasks as allocating memory, enforcing security, and cleaning up memory (garbage collection) when it is no longer needed.
Atlas Members have full access
Get access to this and thousands of other unbiased analyses, roadmaps, decision kits, infographics, reference guides, and more, all included with membership. Comprehensive access to the most in-depth and unbiased expertise for Microsoft enterprise decision-making is waiting.
Membership OptionsAlready have an account? Login Now