NativeAOT publish fails when AsyncHelpers.RestoreInlinedFrameContexts is missing
@simonrozsival is already working on this.
Since Aug 24, 2026.
- #12489 by @copilot-swe-agent — closed without merging
Assessment
This issue has not been assessed yet.
Description
Description
MAUI Android NativeAOT publishing fails consistently because ILCompiler expects System.Runtime.CompilerServices.AsyncHelpers.RestoreInlinedFrameContexts, but the method is absent from the supplied System.Private.CoreLib.
The failure reproduces on both Pixel8 and GalaxyA16 legs in two consecutive dotnet/performance CI builds.
Error
ILCompiler.CodeGenerationFailedException: Code generation failed for method
'Async variant: [System.Private.CoreLib]System.IO.FileStream.DisposeAsync()'
System.InvalidOperationException: Expected method 'RestoreInlinedFrameContexts' not found on type
'[System.Private.CoreLib]System.Runtime.CompilerServices.AsyncHelpers'
The subsequent dotnet publish command exits with code 1 for net11.0-android, android-arm64, with:
/p:UseMonoRuntime=false
/p:PublishAot=true
Affected builds
Versions
- Target framework:
net11.0-android - Runtime identifier:
android-arm64 - Android workload:
37.0.0-rc.2.2294 - ILCompiler/runtime package:
11.0.0-rc.2.26422.106 - MAUI workload:
11.0.0-preview.7.26418.6
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 580
- Avg merge
- 2d 19m
- Merged PRs (30d)
- 228
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/android
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Area: Debugger enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Area: Mono.Android
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
agentic-workflows needs-triage
-
automated needs-triage skill-runner
Difficulty 5/5 Over a week Newbie friendliness 10/100
Similar issues
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100