-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Use IsAotCompatible for libraries #118149
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes AOT (Ahead-of-Time) compilation configuration in .NET libraries by replacing the deprecated EnableAOTAnalyzer
property with the new IsAotCompatible
property. This change ensures that metadata from PR #118008 will be properly included in the libraries.
Key Changes:
- Replaces
EnableAOTAnalyzer
withIsAotCompatible
across all library project files - Updates the default configuration in Directory.Build.props to use the new property
- Maintains the same AOT compatibility settings (true/false values) for each library
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/libraries/Directory.Build.props | Updates default AOT configuration to use IsAotCompatible instead of EnableAOTAnalyzer |
src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj | Changes EnableAOTAnalyzer=true to IsAotCompatible=true |
src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Composition.Hosting/src/System.Composition.Hosting.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Composition.Runtime/src/System.Composition.Runtime.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Composition.TypedParts/src/System.Composition.TypedParts.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.DirectoryServices.AccountManagement/src/System.DirectoryServices.AccountManagement.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Reflection.Context/src/System.Reflection.Context.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Reflection.MetadataLoadContext/src/System.Reflection.MetadataLoadContext.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Runtime.Serialization.Schema/src/System.Runtime.Serialization.Schema.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.ServiceModel.Syndication/src/System.ServiceModel.Syndication.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
src/libraries/System.Windows.Extensions/src/System.Windows.Extensions.csproj | Changes EnableAOTAnalyzer=false to IsAotCompatible=false |
...stem.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this code path need to get updated?
public const string EnableAotAnalyzer = nameof(EnableAotAnalyzer); |
No, the analyzer still should look for
edit: sorry, linked the wrong targets. They are actually built into the SDK: |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Instead of EnableAOTAnalyzer. This is necessary for the metadata added in #118008 to make it into our libraries.