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

Remove memory-safety LangVersion=preview overrides when C# 16 is the default

Aperta
#13,085 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
46/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
build-system

Direzione di ricerca

Start by reading the four listed project files and the linked migrations #13070 and #13078 to understand which LangVersion=preview and memory-safety settings they introduced. Check the repository’s normal language-version policy and confirm C# 16 is the default before changing anything. Done means applicable temporary overrides are removed, unrelated compiler switches and safe-caller rejection remain intact, and the affected tests pass.

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

Descrizione

needs-triage
Android framework version

Other — repository build configuration; not a customer application framework issue.

Affected platform version

The repository SDK/compiler once C# 16 is the default language version. The memory-safety migration currently uses SDK 12.0.100-alpha.1.26480.102 with project-local LangVersion=preview overrides.

Description

Track removal of the temporary <LangVersion>preview</LangVersion> overrides introduced for the updated C# memory-safety model once C# 16 is the repository's default and the migrated code no longer requires preview language features.

Requested by @jonathanpeppers in this review comment. Related migrations: #13070 and #13078.

Current overrides to revisit:

  • external/Java.Interop/src/Java.Interop/Java.Interop.csproj
  • src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
  • src/Microsoft.Android.Build.Tasks/Microsoft.Android.Build.Tasks.csproj
  • tools/tmt/tmt.csproj

When the prerequisite is met, audit any additional overrides introduced by subsequent memory-safety migrations, remove those no longer needed, and inherit the repository's normal language-version policy. Do not replace them with another permanent project-local language-version pin.

Completion criteria:

  • The repository compiler's normal language-version policy selects C# 16 or later, and the migrated syntax is supported without preview.
  • All applicable temporary overrides are removed while unrelated compiler feature switches remain intact. Reassess updated-memory-safety-rules separately; removing LangVersion=preview must not accidentally disable the memory-safety model.
  • Affected projects and relevant existing tests pass, and safe-caller rejection of caller-unsafe APIs is preserved.
Steps to Reproduce

Inspect the project-local LangVersion=preview declarations added by the linked migrations. They are intentional today; this issue tracks their cleanup after C# 16 becomes the default.

Did you find any workaround?

Keep the preview overrides until the prerequisite is satisfied.

Relevant log output

N/A — future build-configuration cleanup, not a current build failure.

Lingua principale
C#
Stelle
2.1k
Fork
581
Merge medio
1g 23h
PR unite (30g)
243

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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.