Repository navigation
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Area: CoreCLRIssues that only occur when using CoreCLR.
Milestone
Description
Android framework version
net11.0-android (Preview)
Affected platform version
.NET 11.0.100-preview.3.26207.106, VS Insiders [11723.189]
Description
Build fails when AOT is enabled and target .net 11 preview 3
Steps to Reproduce
- File -> New Project -> Android Application
- Target .NET 11
- Enable AOT
<RunAOTCompilation>True</RunAOTCompilation>
<AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
- Build
Did you find any workaround?
No response
Relevant log output
1> Optimizing assemblies for size. This process might take a while.
1> [Mono.Android.Runtime.dll] Exec (with response file contents expanded) in C:\Users\aguer\source\repos\AndroidApp1\AndroidApp1: MONO_PATH=C:\Users\aguer\source\repos\AndroidApp1\AndroidApp1\obj\Release\net11.0-android\android-x64\R2R; MONO_ENV_OPTIONS= C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.android-x64\11.0.0-preview.3.26207.106\Sdk\..\tools\mono-aot-cross.exe --debug --nollvm "--aot=asmwriter,temp-path=obj\Release\net11.0-android\android-x64\aot\x86_64\Mono.Android.Runtime,mtriple=x86_64-linux-android,tool-prefix=C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.99.0-preview.3.10\tools\binutils\bin\x86_64-linux-android-,outfile=obj\Release\net11.0-android\android-x64\aot\Mono.Android.Runtime.dll.so,temp-path=obj\Release\net11.0-android\android-x64\Mono.Android.Runtime.dll.tmp,ld-name=ld,ld-flags=--no-relax -s -z max-page-size=16384" "obj\Release\net11.0-android\android-x64\R2R\Mono.Android.Runtime.dll"
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.99.0-preview.3.10\targets\Microsoft.Android.Sdk.Aot.targets(123,5): error : Precompiling failed for C:\Users\aguer\source\repos\AndroidApp1\AndroidApp1\obj\Release\net11.0-android\android-x64\R2R\Mono.Android.Runtime.dll with exit code -1073740791.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.99.0-preview.3.10\targets\Microsoft.Android.Sdk.Aot.targets(123,5): error : Runtime critical type System.Diagnostics.MonoStackFrame not found
1Reacted by Copilot
Metadata
Metadata
Assignees
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Area: CoreCLRIssues that only occur when using CoreCLR.
Activity
simonrozsival commentedon Apr 29, 2026
In .NET 11, we are switching the default runtime from Mono to CoreCLR. It appears that
RunAOTCompilationenables MonoAOT even when building with CoreCLR. This configuration should error with a log message saying something like:jonathanpeppers commentedon Apr 29, 2026
Does this combination fix it?