Native AOT biên dịch C# IL thành native machine code tại build time thay vì JIT lúc runtime.
Lợi ích: khởi động cực nhanh (<50–100ms (AOT) so với 200–500ms (JIT)), bộ nhớ thấp hơn, không có JIT pause. Publish: dotnet publish -r linux-x64 -p:PublishAot=true. Đánh đổi: binary lớn hơn, không dùng reflection tùy tiện (cần trim metadata). Quan trọng với Kubernetes, serverless (Azure Function Apps) và workload nhạy cảm về chi phí. Tính năng production sẵn sàng từ .NET 8+.
Native AOT compiles C# IL to native machine code at build time instead of JIT at runtime.
Benefits: fast startup (<50–100ms (AOT) vs 200–500ms (JIT)), lower memory footprint, no JIT pauses. Publish command: dotnet publish -r linux-x64 -p:PublishAot=true. Trade-offs: larger binary size, no arbitrary runtime reflection without trimming metadata. Critical for Kubernetes, serverless (Function Apps), and cost-sensitive cloud workloads. Production-ready from .NET 8+.