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.
What it is & where it is used

.NET is Microsoft's free, open-source, cross-platform developer platform. Today ".NET" (5, 6, 7, 8, 9, 10…) means the unified, cross-platform successor of .NET Core. The older .NET Framework (1.0–4.8.1) is Windows-only and in maintenance mode.

.NET Framework.NET Core / modern .NET
PlatformsWindows onlyWindows, Linux, macOS
Open sourceReference source onlyFully open source (github.com/dotnet)
Latest4.8.1 (2022), maintenance only.NET 10 (Nov 2025, LTS)
WebASP.NET (System.Web), Web Forms, MVC 5, Web API 2, WCF serverASP.NET Core (MVC, Razor Pages, Web API, Minimal APIs, Blazor, SignalR, gRPC)
DeploymentMachine-wide installSide-by-side, self-contained, single-file, containers, Native AOT
PerformanceGoodMuch faster (Span, tiered JIT, PGO)

Building blocks: runtime (CLR, GC, JIT), libraries (BCL), SDK (compilers, dotnet CLI, MSBuild), ASP.NET Core and Windows Desktop runtimes.

Versions & history
VersionReleasedTypeNotes / support end
.NET Framework 1.02002—First release with C# 1.0
.NET Framework 2.0 / 3.52005 / 2007—Generics; LINQ, WCF, WPF (3.0)
.NET Framework 4.0 → 4.8.12010 → 2022—TPL, async (4.5); 4.8.1 is the last version, supported with Windows
.NET Core 1.0Jun 2016—Cross-platform rewrite
.NET Core 2.1 / 3.12018 / 2019LTS3.1 added WPF/WinForms on Windows; 3.1 ended Dec 2022
.NET 5Nov 2020STS"Core" dropped from the name; one .NET
.NET 6Nov 2021LTSMinimal APIs, hot reload, MAUI (later); ended Nov 2024
.NET 7Nov 2022STSRate limiting, output caching; ended May 2024
.NET 8Nov 2023LTSNative AOT for ASP.NET Core, keyed DI, Blazor full-stack; support ends 10 Nov 2026
.NET 9Nov 2024STSHybridCache, Lock type, OpenAPI built in; STS support was extended to 24 months, so it also ends 10 Nov 2026
.NET 10Nov 2025LTSC# 14, supported until Nov 2028

Release cadence: a new major version every November. Even numbers are LTS (3 years of support); odd numbers are STS (24 months since .NET 9; previously 18). Monthly patch releases ("Patch Tuesday").

Lifecycle

Application startup lifecycle (generic host / ASP.NET Core):

  1. Main / top-level statements run.
  2. WebApplication.CreateBuilder(args) (or Host.CreateApplicationBuilder) creates the host builder: loads configuration (appsettings.json → appsettings.{Environment}.json → user secrets in Development → environment variables → command line), sets up logging and the DI container.
  3. You register services: builder.Services.Add....
  4. builder.Build() builds the service provider and the app.
  5. You configure the middleware pipeline (app.Use...) and endpoints.
  6. app.Run() starts the host: IHostedService.StartAsync for each hosted service, then Kestrel listens.
  7. Requests are processed through middleware → endpoint.
  8. On shutdown (Ctrl+C / SIGTERM): IHostApplicationLifetime.ApplicationStopping fires, hosted services StopAsync, the container disposes singletons.

Build/compile lifecycle: source → Roslyn → IL assembly (.dll) + metadata + PDB → (publish) → at runtime JIT → native code. With Native AOT, IL is compiled to a native executable at publish time (no JIT, fast startup, smaller memory, but no runtime code generation and limited reflection).

Support lifecycle: Preview → RC (go-live) → GA (November) → patches → end of support (LTS 3 years, STS 2 years).

Tools used to develop
ToolPurpose
dotnet CLInew, build, run, test, publish, add package, tool install, --info
Visual Studio 2022/2026, VS Code + C# Dev Kit, RiderIDEs
MSBuild / .csproj (SDK-style)Build system
NuGet / nuget.org, Azure ArtifactsPackages and private feeds
global.jsonPin SDK version
Directory.Build.props, Directory.Packages.propsShared build settings, central package management
dotnet-counters, dotnet-trace, dotnet-dump, dotnet-gcdumpRuntime diagnostics
PerfView, Visual Studio profilerPerformance analysis
.NET Upgrade Assistant / GitHub Copilot app modernizationMigrate .NET Framework → modern .NET
ILSpy, dotPeekDecompile assemblies