Roadmap › 1. .NET › Step 19
.N
Modern .NET — Hosting, Configuration, DI & Deployment
.NET Framework vs .NET Core vs modern .NET, CLR, JIT/AOT, GC, assemblies, NuGet, the generic host, configuration, DI, logging, support lifecycle and deployment models.
Quick revision for interview day. Print it or save it as a PDF.
Versions and support
| Version | Type | Support ends |
|---|---|---|
| .NET Framework 4.8.1 | Legacy | With Windows (no new features) |
| .NET 6 | LTS | Nov 2024 (ended) |
| .NET 7 | STS | May 2024 (ended) |
| .NET 8 | LTS | 10 Nov 2026 |
| .NET 9 | STS | 10 Nov 2026 |
| .NET 10 | LTS | Nov 2028 |
New major every November · even = LTS (3 yrs) · odd = STS (2 yrs).
Runtime terms
CLR (runtime) · IL (intermediate code) · JIT (runtime compile) · tiered compilation + Dynamic PGO · R2R (precompiled) · Native AOT · CTS/CLS · BCL · GC Gen 0/1/2 + LOH (≥ 85 KB) + POH · Workstation vs Server GC.
dotnet CLI
bash
dotnet --info / --list-sdks
dotnet new webapi -n Api
dotnet add package Serilog.AspNetCore
dotnet build -c Release
dotnet test --collect:"XPlat Code Coverage"
dotnet publish -c Release -r linux-x64 --self-contained
dotnet publish -t:PublishContainer
dotnet user-secrets set "Key" "Value"
dotnet tool install -g dotnet-efConfiguration order (last wins)
appsettings.json → appsettings.{Env}.json → user secrets (Dev) → env vars (A__B) → command line.
Options
IOptions (singleton, once) · IOptionsSnapshot (scoped, per request) · IOptionsMonitor (singleton, live + OnChange).
DI lifetimes
Transient · Scoped (per request) · Singleton · Keyed (.NET 8) · no scoped-in-singleton.