-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document IsAotCompatible MSBuild property #35722
Comments
When can library be trimmable but not AOT compatible? |
When it requires dynamically generated code. For example, when it uses IL Ref Emit. The library may only need trim analyzers, and not care about the Aot analyzers. |
Is there going to support for NET Standard in future? |
There is no planned support for .NET Standard with trimming or AOT properties/attributes. See https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/#targetframeworks for more information on this topic. |
Wanted to say I found it confusing the guidance for library authors on the I think there should be a main separate page oriented towards library developers and enabling AOT in their packages, that also goes through how to resolve those warnings; akin to this blog: https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/ This is a hard subject for folks to parse, and the main guidance being in an article geared to apps means it's going to get lost as it doesn't seem relevant at first glance as it's about apps. Even knowing the property to search for, the top two results don't seem relevant: Seems like the blog and the following document are the higher hits when searching more broadly ".NET Library AOT compatibility": https://learn.microsoft.com/dotnet/core/deploying/native-aot/libraries (which has very little information) |
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: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 forIsTrimmable
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
@DamianEdwards @IEvangelist @agocke
Associated WorkItem - 98749
The text was updated successfully, but these errors were encountered: