Skip to content

NativeAOT publish fails when AsyncHelpers.RestoreInlinedFrameContexts is missing #12486

Description

@matouskozak

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

Metadata

Metadata

Labels

needs-triageIssues that need to be assigned.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions