Skip to content

MAUI Android publish fails: missing System.Activator.CreateDefaultInstance #12921

Description

@matouskozak

Description

MAUI Android performance CI jobs fail when publishing MauiAndroidDefault.csproj with UseMonoRuntime=true.

Error

Unhandled exception. System.InvalidOperationException:
Expected method 'CreateDefaultInstance' not found on type
'[S.P.CoreLib]System.Activator'

error NETSDK1096: Optimizing assemblies for performance failed.

The stack trace includes ILCompiler.ReadyToRunCodegenCompilation (which is weird for Mono...)

Environment

Component Version
Build host Windows 22H2, x64
Target net11.0-android, android-arm64, Release
.NET SDK 11.0.100-rtm.26473.115
Android workload 37.99.0-preview.1.30
MAUI workload 11.0.0-rc.2.26474.8
dotnet/performance commit 1f0e0f68889a0996f30e265846446549a801800e

Expected and actual behavior

Expected: The configured Mono performance scenario publishes successfully.

Actual: Crossgen throws the exception above, and publish fails with NETSDK1096. The underlying cause is not yet confirmed.

CI evidence

The corresponding Default CoreCLR jobs pass in both builds. CI links require internal Azure DevOps access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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