Runtime & CLR
What happens beneath your C# code. Build system, garbage collection (split into fundamentals + tuning because the senior bar demands it), JIT and PGO, NativeAOT and trimming, source generators, allocations and pooling, and assembly loading.
Topics (canonical order)
-
SDK-style projects,
Directory.Packages.props(CPM),Directory.Build.props, multi-targeting, RIDs,PublishAot,PublishTrimmed -
Generations (gen0/½ + LOH + POH), workstation vs server GC, DATAS, GC modes, write barriers
-
Finalizers, weak references,
dotnet-gcdump, fragmentation, GC profiling, latency tuning -
Tiered JIT, dynamic PGO, loop optimizations in .NET 9/10, inlining, R2R
-
When to use NativeAOT, trimming rules,
DynamicallyAccessedMembers, reflection-free patterns -
Incremental SGs,
[LoggerMessage], JSON SG, regex SG, perf, writing one -
ArrayPool<T>,ObjectPool<T>,stackalloc, large allocations -
Assembly Loading & LoadContext
AssemblyLoadContext, plugin loading, isolation, collectibility -
Vector<T>,Vector128/256/512<T>,System.Runtime.Intrinsics,SearchValues<T>,TensorPrimitives -
Work-stealing queues, hill-climbing,
SetMinThreads, starvation, IO completion threads -
EventSource & EventPipe Authoring
EventSource,EventListener,EventPipe,dotnet-counters,Meterintegration -
Globalization: ICU vs NLS & Invariant Mode
ICU default, NLS opt-in, invariant mode, ordinal vs culture-aware comparison, AOT impact
-
Portable/embedded PDBs, deterministic builds,
.snupkg, symbol servers,dotnet symbol -
Cross-Runtime: CoreCLR / Mono / NativeAOT / WASM
When each runtime is used, MAUI / Blazor WASM AOT, perf comparison, library compat
-
Roslyn Compiler API & Workspaces
DiagnosticAnalyzer, code-fix providers,MSBuildWorkspace, shipping analyzer NuGet packs -
Async Stack Traces & Debugger Support
State-machine walking,
[StackTraceHidden],[AsyncMethodBuilder],ExecutionContextflow -
Consuming analyzers, severity escalation, .editorconfig + warnaserror, sarif upload to GitHub code scanning
-
Reflection-free type metadata via source generators; AOT-/trim-safe serializers, mappers, validators
Why this order
MSBuild comes first because everything later (multi-targeting, AOT publish, RIDs, central package management) is configured there. GC is split because fundamentals + diagnosing are two different mental modes. JIT/PGO follows GC because both are runtime engines that interact during execution. NativeAOT comes after both because it inverts JIT assumptions and has trimming implications. Source generators precede pooling because some of the perf wins (logging source-gen, JSON source-gen) eliminate allocations seen in pooling.
Cross-references
- Source generators here are referenced from Regex & SearchValues, System.Text.Json — Serialization Deep, and Structured Logging.
- NativeAOT/trimming cross-references Docker & Containers for chiseled/distroless AOT images.
- GC topics inform Allocation Hunting.