dotnet-aot-compat
OfficialMake .NET projects AOT-compatible
Authordotnet
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps developers make their .NET projects compatible with Native AOT and trimming by systematically resolving build warnings related to Ahead-Of-Time compilation and code trimming.
Core Features & Use Cases
- Resolve IL Warnings: Fixes specific IL codes (IL2026, IL2070, IL2067, IL2072, IL3050) that indicate potential issues with Native AOT or trimming.
- Add Annotations: Guides the addition of
[DynamicallyAccessedMembers]annotations to preserve type information for the trimmer. - Refactor for Flow: Assists in refactoring code to maintain annotation flow when it's broken by boxing or untyped collections.
- Use Case: You've upgraded a .NET project to .NET 8 and are encountering numerous trim analyzer warnings. This Skill will guide you through enabling AOT compatibility in your project file, building to collect warnings, and systematically fixing them using annotation and refactoring strategies.
Quick Start
Enable AOT analysis in your .csproj by adding <IsAotCompatible>true</IsAotCompatible> within a PropertyGroup.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dotnet-aot-compat Download link: https://github.com/dotnet/skills/archive/main.zip#dotnet-aot-compat Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.