dotnet / dotnet/skills

Skill idea: Trimming & AOT Readiness

Open
#8 3 comments 1 reaction 0 assignees View on GitHub
area-diag skill
Dominant language
C#
Stars
5.4k
Forks
415
Avg merge
1d 4h
Merged PRs (30d)
84

Description

## Problem

Making .NET libraries and applications trim-safe and AOT-compatible is one of the most-requested areas of help, and the knowledge is almost entirely tribal. Trim warnings are cryptic, annotation patterns are underdocumented, and the cost/benefit analysis of `PublishAot` requires deep runtime understanding.

## What expert .NET knowledge would this encode?

- Which reflection patterns are trim-safe and which are not
- How to annotate libraries for trimming (`[DynamicallyAccessedMembers]`, `[RequiresUnreferencedCode]`)
- Understanding trim warnings and whether they are safe to suppress
- Making DI containers, serializers, and config binders AOT-compatible
- The actual cost/benefit analysis of `PublishAot` for a given app type

## Skill concept

A "make my library trim/AOT-safe" skill — scanning code for trim-unsafe patterns, suggesting annotations, and guiding the developer through the AOT readiness process with runtime-team-level precision.

## Why customers would value this

AOT and trimming are the future of .NET deployment (mobile, cloud-native, WASM). Customers are eager to adopt them but blocked by the difficulty of making existing code compatible. This would be a killer feature — encoding knowledge that currently requires filing issues on dotnet/runtime to obtain.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.