Skip to content
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

IsAotCompatible not supported on all platforms #2646

Closed
breyed opened this issue Nov 26, 2024 · 1 comment
Closed

IsAotCompatible not supported on all platforms #2646

breyed opened this issue Nov 26, 2024 · 1 comment
Labels
Pri3 resolved-by-customer Indicates issues where the customer no longer needs any help. [org]

Comments

@breyed
Copy link
Contributor

breyed commented Nov 26, 2024

Publish using Native AOT says to enable IsAotCompatible for all platforms (even on Android where it is not supported). However, building a MAUI 9 project with the project file setting IsAotCompatible to true gives this warning that IsAotCompatible is not supported on Android:

/usr/local/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): warning NETSDK1210: 
  IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
  <IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
@breyed
Copy link
Contributor Author

breyed commented Nov 30, 2024

The docs and warning are correct. The warning only occurs when using a shared library with a downlevel framework such as netstandard2.1.

@breyed breyed closed this as completed Nov 30, 2024
@dotnetrepoman dotnetrepoman bot added the resolved-by-customer Indicates issues where the customer no longer needs any help. [org] label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pri3 resolved-by-customer Indicates issues where the customer no longer needs any help. [org]
Projects
None yet
Development

No branches or pull requests

1 participant