
Description
dotnet-aot-compat is an agent skill that makes .NET projects compatible with Native AOT and trimming. It works through the IL trim and AOT analyzer warnings in a project one by one until none remain. Typical fixes include adding DynamicallyAccessedMembers annotations, annotating reflection code for the trimmer, and turning on IsAotCompatible in the .csproj. The skill is for projects that were flagged after moving to a newer target such as net8.0, or for teams that want to publish trimmed or AOT builds. It does not apply to projects that target only .NET Framework (net4x), because those do not support the trim and AOT analyzers. The page lists the warning codes it handles, including IL2070, IL2067, IL2072, IL2026 and IL3050.…
Highlights
- Resolves IL trim and AOT analyzer warnings one by one
- Adds DynamicallyAccessedMembers annotations
- Enables IsAotCompatible in the project file
- Covers warnings such as IL2070, IL2067, IL2072, IL2026 and IL3050
Ratings & Reviews
No ratings yet
Be the first to rate dotnet-aot-compat.
People also visit

.NET MCP Server
AI assistant access to .NET SDK for projects, packages, building, testing

migrate-dotnet9-to-dotnet10
Migrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes

dotnet-best-practices
Validate .NET/C# code against comprehensive best practices for your solution
dotnet-aot-compat FAQ
What does this skill change?
It works through the trim and AOT analyzer warnings in a .NET project and adds the annotations or project settings needed to clear them, so the project can be trimmed or compiled with Native AOT.
Which projects is it not for?
Projects that target only .NET Framework (net4x). Those projects do not support the trim and AOT analyzers.
What kinds of requests trigger it?
Requests such as making a project AOT-compatible, fixing trimming warnings, adding DynamicallyAccessedMembers annotations, or enabling IsAotCompatible in the .csproj.
How do I install it?
Run npx skills add https://github.com/dotnet/skills --skill dotnet-aot-compat in your project.
What security audits has it passed?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best dotnet-aot-compat alternatives?
Popular alternatives to dotnet-aot-compat include .NET MCP Server, dotnet-maui-doctor and dotnet-skills. See all dotnet-aot-compat alternatives





