A compiler translates source code from one programming language into another executable or intermediate representation. In .NET, C#, F#, and Visual Basic compilers translate high-level code into Common Intermediate Language (CIL), which the CoreCLR runtime executes. section 1.1 section 1.5.2
The .NET compilation path separates language translation from processor-specific execution:
- Language compilers produce CIL and package it in a Dynamic Link Library (DLL). section 1.5.1
- CIL avoids assumptions about processor architecture, operating system, registers, instruction sets, and cache sizes. section 1.5.1 section 1.5.2
- The CoreCLR JIT compiler converts only code about to be used into machine code at runtime, limiting unnecessary startup work. section 1.5.2
- An ahead-of-time (AOT) compiler can perform initial processor-specific compilation, trim unused code, and avoid waiting for JIT compilation. section 1.5.2
A portable .NET assembly
A C# compiler produces a CIL DLL rather than a separate binary for every operating system and processor. The DLL can run on machines with a compatible .NET runtime, where CoreCLR converts its CIL into machine code. section 1.5.1
Figure 1.4 .NET languages compile to CIL in a DLL file that can be run on any machine with a .NET runtime.
Use the compilation diagram to trace .NET languages through CIL in a DLL and into execution on a machine with a .NET runtime. section 1.5.1








