-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Unable to build with AOT enabled #18839
Comments
What platform are you targeting here?
What does this mean? AOT is already enabled in Unfortunately, just saying "AOT" isn't specific enough. Is it Mono AOT or NativeAOT? Thanks! |
Hi @Petrarca181. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
I am facing the same issue when trying to enable NativeAOT (via I tried it both on macOS M1 and Windows x64 using dotnet 8.0.100. To reproduce:
dotnet new maui -n AndroidNativeAotError
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<PublishAot>true</PublishAot>
</PropertyGroup>
dotnet publish -f net8.0-android -c Release /p:AndroidSigningKeyStore=(...) /p:AndroidSigningStorePass=(...) /p:AndroidSigningKeyAlias=(...) /p:AndroidSigningKeyPass=(...)
Note that publishing for Full logs for dotnet publish |
I checked a little bit the MSBuild logs and noticed the I thought this was because the RuntimeIdentifier
Full logs |
This seems to be coming from here: https://github.com/dotnet/runtime/blob/e440ebc55895c80fced3410b8018dee79eb2ce4a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets#L74 I got no idea what it does but setting And then setting
No idea what this all means. Does the native AOT compilation have any machine type restrictions? Does only work on windows x64 or will it work on any type? |
For my side, what I found is when you add this to your project: true. It will automatically add Microsoft.DotNet.ILCompiler to your nuget packages. But it can not be resolved bacause runtime.linux-arm (arm32) is not supported anymore. |
To be clear, NativeAOT is not yet supported on Android -- that is the cause of the various errors above. It will be a long road, but the beginning of this work is happening at:
We are just getting started with NativeAOT on Android. It may not even be available when .NET 9 ships, we don't actually know yet. For now, I would only try to use NativeAOT on iOS, which is also experimental. If you find issues using it, you can file them here: Hope that helps! But I think we can close this as duplicate of our other ongoing NativeAOT work. |
Description
Can't install Microsoft.DotNet.ILCompiler at all. Getting ths error in my Maui project:
Unable to find package runtime.linux-arm.Microsoft.DotNet.ILCompiler.
Steps to Reproduce
1 Create Fresh maui app
2 enable aot
3build
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
no
Relevant log output
No response
The text was updated successfully, but these errors were encountered: