-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Issue description
dotnet/sdk#31766 added support for a new MSBuild property to set in libraries: <IsAotCompatible>true</IsAotCompatible>. Setting this property defaults the following properties:
- IsTrimmable=true
- EnableTrimAnalyzer=true
- EnableSingleFileAnalyzer=true
- EnableAotAnalyzer=true
If a library wants to be "Native AOT compatible", it can set this one property to enable all the Roslyn analyzers to ensure the library is compatible.
We should add documentation for this property in our docs site. It is similar to IsTrimmable, but goes further for AOT. The only docs I could find for IsTrimmable is https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming#enable-project-specific-trimming. Potentially we could document IsAotCompatible in the sibling section at https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/.
Target framework
- .NET Core - only the v8.0+ .NET SDK respects this property
- .NET Framework
- .NET Standard
@DamianEdwards @IEvangelist @agocke