Roadmap › 1. .NET › Step 9
CLR

.NET Internals — CLR, CTS, CLS, IL, JIT, Memory Management & Garbage Collection

Every .NET version from .NET Framework 1.0 to .NET 10, the .NET architecture (CLR, BCL, CTS, CLS), compilation from C#/VB.NET to IL to machine code (Roslyn, JIT, tiered compilation, ReadyToRun, Native AOT), assemblies, manifests, metadata, GAC and strong names, AppDomains vs AssemblyLoadContext, type loading and method tables, stack and heap, value vs reference type layout, the garbage collector in depth (generations, LOH, POH, workstation/server, background GC), finalization, IDisposable, memory leaks and diagnostics, threading and the thread pool, async internals and exceptions inside the CLR.
What it is & where it is used

.NET is a developer platform: a runtime that executes code (the CLR), a huge class library (BCL), languages (C#, VB.NET, F#), SDK tools (dotnet CLI, compilers, NuGet) and app models (ASP.NET, WinForms, WPF, MAUI, Worker Services).

text
┌──────────────────────────────────────────────────────────────┐
│ Your code: C# · VB.NET · F#                                    │
├──────────────────────────────────────────────────────────────┤
│ App models: ASP.NET Core · Web Forms/MVC (Framework) · WPF ·   │
│             WinForms · MAUI · Worker · Console                 │
├──────────────────────────────────────────────────────────────┤
│ Base Class Library (BCL): System, Collections, IO, Net, Linq,  │
│ Threading, Text.Json, Data, Security …                         │
├──────────────────────────────────────────────────────────────┤
│ CLR (Common Language Runtime): JIT · GC · type system (CTS) ·  │
│ type safety · exceptions · threading · security · interop      │
├──────────────────────────────────────────────────────────────┤
│ Operating system: Windows · Linux · macOS · (Android/iOS)      │
└──────────────────────────────────────────────────────────────┘
TermFull formOne line
CLRCommon Language RuntimeThe virtual machine that loads, compiles (JIT), runs and manages .NET code
CTSCommon Type SystemRules for how types are defined and behave — shared by all .NET languages
CLSCommon Language SpecificationSubset of CTS every language must support so libraries work across languages
IL / MSIL / CIL(Microsoft/Common) Intermediate LanguageCPU-independent instructions produced by the compiler
JITJust-In-Time compilerConverts IL to native machine code at runtime (RyuJIT)
BCL / FCLBase / Framework Class LibraryBuilt-in libraries
GCGarbage CollectorAutomatic memory management
Managed code—Code executed under the CLR (memory, safety managed)
Unmanaged code—Native code outside the CLR (C/C++ DLLs, COM, Win32) — called via P/Invoke or COM interop
Versions & history

Every .NET version (release year, what shipped, support status as of 2026):

.NET Framework (Windows only):

VersionYearCLRVisual StudioHeadline features
1.020021.0VS .NET 2002First release: CLR, C# 1.0, VB.NET, ASP.NET Web Forms, ADO.NET, WinForms
1.120031.1VS .NET 2003ASP.NET mobile controls, ODBC/Oracle providers, side-by-side execution
2.020052.0VS 2005Generics, nullable types, anonymous methods, partial classes, ASP.NET 2.0 (master pages, membership), 64-bit
3.020062.0(VS 2005 extensions)WPF, WCF, WF (Workflow), CardSpace
3.520072.0VS 2008LINQ, C# 3.0, ASP.NET AJAX; 3.5 SP1 (2008): Entity Framework 1, ASP.NET Dynamic Data
4.020104VS 2010TPL (Task), PLINQ, dynamic, MEF, Code Contracts, ASP.NET MVC 2 era
4.520124VS 2012async/await, ASP.NET Web API, SignalR, Web Forms model binding
4.5.1 / 4.5.22013 / 20144VS 2013Debugging and performance improvements
4.6 – 4.6.22015 – 20164VS 2015RyuJIT for x64, ASP.NET 4.6, long-path support (4.6.2)
4.7 – 4.7.22017 – 20184VS 2017TLS 1.2 defaults, high-DPI WinForms
4.820194VS 2019Last major Framework version; JIT and accessibility updates
4.8.120224VS 2022Native ARM64 support

.NET Framework 4.8/4.8.1 is supported as part of Windows (no new features). Web Forms, WCF server and Windows Workflow exist only here.

.NET Core (cross-platform, open source):

VersionYearTypeHeadline features
1.02016—Cross-platform runtime, ASP.NET Core 1.0, EF Core 1.0, project.json
1.12016—More APIs
2.02017—.NET Standard 2.0 (~32k APIs), Razor Pages, back to .csproj
2.12018LTSSpan<T>, SignalR, HttpClientFactory, global tools
2.22018—Health checks, IIS in-process hosting
3.02019—WinForms & WPF on Windows, C# 8, Blazor Server, gRPC, endpoint routing, System.Text.Json
3.12019LTSLong-term support version of 3.0; Blazor improvements

.NET 5 and later ("one .NET" — the successor of both Framework and Core):

VersionReleaseSupportC#Headline features
.NET 5Nov 2020STS9Unified platform name (skipped "4" to avoid confusion with Framework), records, single-file apps
.NET 6Nov 2021LTS10Minimal APIs, hot reload, MAUI (2022), DateOnly, PriorityQueue, unified WebApplication
.NET 7Nov 2022STS11Generic math, rate limiting, output caching, Native AOT for console
.NET 8Nov 2023LTS12Native AOT for ASP.NET Core APIs, Blazor United (static SSR + interactive), TimeProvider, FrozenDictionary, Aspire (preview), keyed DI
.NET 9Nov 2024STS (extended to 24 months)13HybridCache, built-in OpenAPI generation, System.Threading.Lock, LINQ CountBy/AggregateBy, GC dynamic adaptation (DATAS) on by default for Server GC
.NET 10Nov 2025LTS14Extension members, field keyword, file-based apps (dotnet run app.cs), JIT de-virtualisation and stack allocation improvements, EF Core 10, ASP.NET Core 10
.NET 11Nov 2026 (expected)STS15In preview during 2026

Support policy: a new version every November; LTS (even numbers) = 3 years of support, STS (odd numbers) = 2 years (extended from 18 months starting with .NET 9). .NET Standard (1.0–2.1) was a specification of APIs shared by Framework, Core, Xamarin and Unity — target netstandard2.0 only for libraries that must still run on .NET Framework.

Lifecycle

From source code to running program:

  1. Write C#/VB.NET/F# source.
  2. Compile — Roslyn (csc/vbc, run by dotnet build/MSBuild) produces an assembly (.dll/.exe) containing IL + metadata (types, members, references) + manifest (assembly name, version, culture, references, resources).
  3. Launch — the host (dotnet.exe/apphost/IIS ANCM) reads *.runtimeconfig.json, locates the right runtime version and starts the CLR (coreclr.dll / libcoreclr.so).
  4. Load — the assembly loader loads the assembly and its dependencies (*.deps.json) into an AssemblyLoadContext.
  5. Type loading — the first use of a type builds its MethodTable (type info, method slots), runs its static constructor.
  6. JIT — the first call to a method compiles its IL to native code (tier 0, quick), replaces the stub; hot methods are recompiled with full optimisations (tier 1, possibly using profile data — Dynamic PGO).
  7. Execute — native code runs on the CPU; allocations go to the managed heap; the GC reclaims unreachable objects; exceptions unwind stack frames.
  8. Shutdown — finalizers may run, the process exits and the OS frees everything.
Tools used to develop
  • Inspect IL/assemblies: ILSpy, dnSpy, dotPeek, ildasm (Framework SDK), SharpLab.io (C# → IL → JIT assembly in the browser).
  • Diagnostics CLI: dotnet-counters (GC, CPU, thread pool live), dotnet-trace (event traces), dotnet-dump (memory dumps + analyze), dotnet-gcdump (heap snapshots), dotnet-stack.
  • Profilers: Visual Studio Diagnostic Tools / Performance Profiler, PerfView, JetBrains dotMemory/dotTrace, WinDbg + SOS.
  • Benchmarking: BenchmarkDotNet ([MemoryDiagnoser] shows allocations).
  • Info: dotnet --info, dotnet --list-runtimes, dotnet --list-sdks.