dotnet-native-aot
Installation
SKILL.md
dotnet-native-aot
Full Native AOT compilation pipeline for .NET 8+ applications: PublishAot configuration, ILLink descriptor XML for type preservation, reflection-free coding patterns, P/Invoke considerations, binary size optimization, self-contained deployment with runtime-deps base images, and diagnostic analyzers (EnableAotAnalyzer/EnableTrimAnalyzer).
Version assumptions: .NET 8.0+ baseline. Native AOT for ASP.NET Core Minimal APIs and console apps shipped in .NET 8. .NET 9 improved trimming warnings and library compat. .NET 10 enhanced request delegate generator and expanded Minimal API AOT support.
Scope
- PublishAot MSBuild configuration (apps vs libraries)
- Diagnostic analyzers (EnableAotAnalyzer, EnableTrimAnalyzer)
- ILLink descriptor XML for type preservation
- Reflection-free coding patterns
- P/Invoke with LibraryImport source generation
- Binary size optimization and self-contained deployment
- ASP.NET Core Native AOT (Minimal APIs, CreateSlimBuilder)