Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

MAUI Android publish fails: missing System.Activator.CreateDefaultInstance

Aperta
#12,921 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
android, csharp

Direzione di ricerca

Start by reproducing the publish failure from MauiAndroidDefault.csproj with UseMonoRuntime=true and compare it with the passing Default CoreCLR jobs. Inspect the failure around ILCompiler.ReadyToRunCodegenCompilation and the missing System.Activator.CreateDefaultInstance method; done means the configured Mono performance scenario publishes successfully without NETSDK1096.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage
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.

Lingua principale
C#
Stelle
2.1k
Fork
580
Merge medio
2g 2h
PR unite (30g)
239

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/android

Tutte le issue di dotnet/android

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.