aot-trimming

Installation
SKILL.md

.NET Trimming and Native AOT

When to Use

  • Adding trimming (PublishTrimmed) or Native AOT (PublishAot) support to a library or application
  • Resolving IL2xxx (trimming) and IL3xxx (AOT/single-file) warnings
  • Making reflection-heavy code trimming-safe
  • Replacing runtime reflection, assembly scanning, or Reflection.Emit with compile-time alternatives
  • Reviewing a codebase or PR for trimming/AOT compatibility, including generated interceptors and analyzer suppressors
  • Designing public APIs that must carry trimming annotations

Core Goals

  • Produce code that survives the linker's reachability analysis and runs under Native AOT (no JIT).
  • Express what the compiler cannot see — which members reflection needs — using the trimming attributes.
  • Keep trimming-safe and trimming-unsafe code separated so unsafe paths are explicit and contained.

Core Model

Installs
25
GitHub Stars
1.2K
First Seen
Sep 11, 2026
aot-trimming — aaronontheweb/dotnet-skills