Skip to content

feat: add support for .NET 11 RC 1 - #5566

Merged
jamescrosswell merged 14 commits into
version7from
net11-rc1
Sep 16, 2026
Merged

jamescrosswell merged 14 commits into
version7from
net11-rc1

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Follows #5529 (preview 7) through to RC 1, targeting version7.

Closes #5552

The version bump

preview 7 RC 1
SDK (global.json) 11.0.100-preview.7.26381.103 11.0.100-rc.1.26425.128
workload set (global.json) 11.0.100-preview.7.26410.2 11.0.100-rc.1.26458.5
prerelease Microsoft.* package refs 11.0.0-preview.7.26381.103 11.0.0-rc.1.26425.128

RC 1 moved no TFMs — macios dotnet-11.0.1xx-rc1-12193 still publishes net11.0-ios26.5/net11.0-maccatalyst26.5 and android 37.0.0-rc.1.2257 is still API 37.0 — so Directory.Build.props' TFM block, every project and sample that derives from it, and all the Verify snapshots are untouched. Xcode 26.6 (which RC 1 requires), platforms;android-37.0 and 10.0.x in dotnet-version were all already in place from #5529.

The runtime-deps container pins stay on the 11.0-preview-* tags. MCR now also publishes non-preview 11.0-resolute-chiseled/11.0-alpine, but runtime-deps carries OS-level dependencies rather than the runtime, so the distro is what matters and the preview tags still resolve correctly. Per the CONTRIBUTING.md checklist these get blanked at GA, not at RC.

The interesting part: four things RC 1 broke

Each was isolated the same way rather than guessed at - swap global.json back to preview 7, rebuild the single project and TFM that failed, compare. That technique is now written into CONTRIBUTING.md, along with rows for all four.

1. CS0400 in the Android bindings — blocked every job. The android 37 generator keeps methods whose parameter types are unbound, where android 36 dropped them before the Metadata.xml transforms ran (the overload is in api.xml.class-parse but not api.xml). TombstoneParser.parse(Tombstone) takes a type from epitaph, which we reference with Bind="false", so the generated binding emitted an unresolvable global::Com.Abovevacant.Epitaph.Core.Tombstone. Dropped the overload; we never call TombstoneParser from C# and the parameterless parse() is unaffected.

Scoped to net11+ in its own transform file, because the Android SDK auto-globs Transforms/**/*.xml into every TFM and the entry warns BG8A00: matched no nodes on android 36 - which reads exactly like a broken XPath to whoever hits it next.

2. CsWinRT1032 on both -windows TFMs. RC 1 ships a CsWinRT that rejects a collection expression whose target is a non-mutable interface, because the synthesised type isn't trim/AOT-safe for WinRT. BreadcrumbEvent.extraData is params IEnumerable<(string key, string value)>, so four gesture breadcrumbs tripped it. Cast to a concrete array rather than changing the public signature. Note this hits net10.0-windows too - 8 errors under RC 1, 0 under preview 7, same source.

3. IL2037 ×154 when linking an Apple app. MAUI 11 RC 1's own Compatibility handler descriptors name members that don't resolve. ILLinkTreatWarningsAsErrors defaults to TreatWarningsAsErrors, so these failed the build. Demoted via WarningsNotAsErrors rather than silenced with NoWarn, so it stays visible and gets removed once MAUI fixes the descriptors. We ship no ILLink descriptors of our own, so every IL2037 is external by construction; Sentry.TrimTest and Sentry.MauiTrimTest opt out of Directory.Build.props, so the Trim analysis job keeps the strict setting.

4. Apple symbol upload silently stopped uploading framework symbols — this one affects customers.

Sentry.targets collected the framework assemblies' PDBs (Microsoft.iOS, Microsoft.Maui.*) from $(IntermediateOutputPath)linked. RC 1 renamed that directory to postprocessed-assemblies. The glob is Exists()-guarded, so nothing errored - six fewer debug files were uploaded and framework frames stopped symbolicating.

linked/ postprocessed-assemblies/
preview 7 11 PDBs absent
RC 1 absent the identical 11 PDBs

The names are mutually exclusive per SDK, so probing both covers every supported iOS SDK and double-counts nothing. This ships in buildTransitive, so it would have hit any customer building a .NET 11 Apple app with Sentry, not just this repo - the same class of silent breakage as the Native AOT _CopyAotSymbols change in #5529.

Worth flagging in review: it was caught only because integration-test/cli.Tests.ps1 asserts the exact upload set. Both probes remain Exists()-guarded, so the next rename will also fail silently in production and show up only as that test failing. I've said so in a comment above the probes; please don't loosen that assertion to a count.

Known gap, unchanged from #5529

Sentry.MauiTrimTest targets only net10.0-android36.0;net10.0-ios26, so MAUI trim analysis doesn't cover net11.0 at all - which is a shame given #3 above was a MAUI trimming regression. Left alone here since widening it is a scope decision rather than part of an RC bump, but it may be worth a follow-up.

Separately, dotnet publish test/Sentry.MauiTrimTest -f net10.0-ios26 can't be built on a machine set up for this branch: it pins Xcode 26.0 while RC 1's net11.0-ios26.5 requires the 26.6 that CI pins. CI has that publish commented out already (provisioning profiles), so nothing is lost.

🤖 Generated with Claude Code

Bumps the SDK, workload set and prerelease Microsoft.* package references
from preview 7 to RC 1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (version7@21f45f0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...Maui/Internal/MauiGestureRecognizerEventsBinder.cs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             version7    #5566   +/-   ##
===========================================
  Coverage            ?   74.67%           
===========================================
  Files               ?      515           
  Lines               ?    18892           
  Branches            ?     3684           
===========================================
  Hits                ?    14107           
  Misses              ?     3903           
  Partials            ?      882           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jamescrosswell and others added 4 commits September 10, 2026 17:14
The android 37 (RC 1) binding generator keeps methods whose parameter types
are unbound, where android 36 dropped them before the Metadata.xml transforms
ran. epitaph is referenced with Bind="false", so the generated binding emitted
an unresolvable global::Com.Abovevacant.Epitaph.Core.Tombstone (CS0400),
failing every job that builds the Android bindings.

Scoped to net11.0+ via an explicit TransformFile Remove, because the Android
SDK auto-globs Transforms/**/*.xml into every TFM and the entry would warn
BG8A00 on android 36, where the node no longer exists by transform time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…te array

The RC 1 SDK ships a CsWinRT that rejects a collection expression whose target
is a non-mutable interface type (CsWinRT1032), because the type the compiler
synthesises isn't trim/AOT-safe for WinRT. BreadcrumbEvent's extraData is
params IEnumerable<(string key, string value)>, so the four gesture breadcrumbs
tripped it on both -windows TFMs.

Verified by building src/Sentry.Maui for net10.0-windows under each SDK: 8
errors under RC 1, 0 under preview 7. Casting to a concrete array clears it
without touching the public BreadcrumbEvent signature.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MAUI 11 RC 1 emits 154 IL2037s from its own Compatibility handler descriptors
when linking an Apple app, and ILLinkTreatWarningsAsErrors defaults to
TreatWarningsAsErrors, so those failed the build. Verified as an RC 1
regression by rebuilding Sentry.Samples.Maui for net11.0-maccatalyst under
each SDK: 154 under RC 1, 0 under preview 7.

Demoted rather than silenced so it stays visible and gets removed when MAUI
fixes the descriptors. We ship no ILLink descriptors of our own, so every
IL2037 is external; Sentry.TrimTest and Sentry.MauiTrimTest opt out of
Directory.Build.props, so the "Trim analysis" job keeps the strict setting.

Also extends the CONTRIBUTING upgrade checklist, as that section asks: rows for
the three failures this bump hit (CS0400, CsWinRT1032, IL2037), the two traps
that make a local samples build misleading, and the global.json swap that
distinguishes a toolchain regression from local noise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sentry.targets collected the framework assemblies' PDBs (Microsoft.iOS,
Microsoft.Maui.*) from $(IntermediateOutputPath)linked. .NET 11 RC 1 renamed
that directory to postprocessed-assemblies, and because the glob is
Exists()-guarded it started failing silently - no error, just six fewer debug
files uploaded and no symbolication for framework frames.

This ships in buildTransitive, so it affects any customer building a .NET 11
Apple app with Sentry, not just this repo. Same class of bug as the Native AOT
_CopyAotSymbols breakage in #5529.

Verified on the same project, TFM and RID under each SDK: preview 7 produces
linked/ with 11 PDBs and no postprocessed-assemblies; RC 1 produces
postprocessed-assemblies with the identical 11 and no linked/. The two names
are mutually exclusive per SDK, so probing both double-counts nothing.

Caught by integration-test/cli.Tests.ps1, which asserts the exact upload set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jamescrosswell and others added 4 commits September 14, 2026 16:26
The Native AOT integration test failed on win-arm64 with LNK1322 (Cortex-A53
erratum 843419). dotnet/runtime#133835 identified it as VS 2022's linker:
.NET 10+ requires Visual Studio 2026, whose linker no longer applies that
check. windows-11-arm only has VS 2022 (MSVC 14.44); windows-11-vs2026-arm has
VS 2026 (MSVC 14.51).

Verified in a standalone repro: the same failing build links on
windows-11-vs2026-arm and still fails on windows-11-arm
(jamescrosswell/dotnet-nativeaot-lnk1322-repro, run 34805799061).

build-sentry-native stays on windows-11-arm on purpose. The sentry-native.lib
it compiles ships in the package, and MSVC libraries can only be linked by a
toolset at least as new as the one that built them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#5504 (logs always enabled) landed on version7 after this branch was cut and
updated the logging snapshots for net8.0, net9.0 and net10.0 but not net11.0,
which failed the Linux jobs once this PR was tested merged with version7.

Regenerated locally for net11.0. Each diff is the same added lines #5504 made
to the DotNet10_0 snapshot: the [Obsolete] on EnableLogs in the Sentry and
Sentry.NLog API approvals, and the extra envelope item in
WebIntegrationTests.Versioning.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread .github/workflows/build.yml Resolved
@jamescrosswell

Copy link
Copy Markdown
Collaborator Author

Why build-sentry-native.ps1 passes -T v143

Drop -T v143 once VS 2022 is out of support, or if the v143 component disappears from the runner images.

…2022 toolset

GitHub is moving hosted Windows runners to Visual Studio 2026: windows-latest
already runs the VS 2026 image and windows-11-arm follows between September 21
and 30 (actions/runner-images#14602). Use the explicit VS 2026 labels for every
Windows job rather than relying on those labels changing underneath us.

The shipped sentry-native.lib is the exception: VS 2022 can't link a library
built with VS 2026's MSVC, and VS 2022 is still supported for .NET 8 and 9.
The VS 2026 images still install the VS 2022 toolset (MSVC 14.44), so
build-sentry-native.ps1 selects it with -T v143. The reasoning is in
#5566 (comment).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread .github/workflows/build.yml Resolved
Comment thread Directory.Build.props Resolved
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
@jamescrosswell
jamescrosswell marked this pull request as ready for review September 15, 2026 03:14
@github-actions github-actions Bot added the risk: high PR risk score: high label Sep 15, 2026
The comment edit in 8ba1bc7 replaced the cast instead of preceding it, so
OnPanGesture's collection expression failed CsWinRT1032 on the -windows TFMs.
Also shortens the remaining binding-transform comments.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread CONTRIBUTING.md Resolved
Removes the samples/global.json debugging notes from CONTRIBUTING.md, which is
for humans, and keeps the two generic points as short bullets in AGENTS.md.
Also drops PR-specific details from the upgrade table rows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- os: macos-26 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
rid: macos # universal (osx-arm64 + osx-x64)
- os: windows-latest
- os: windows-2025-vs2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: Doesn't latest already include vs2026?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't for arm - so I just pinned both x64 and arm64 using the vs2026 label for consistency.

The Arm64 label will also move next week - overall those more 'generic' labels on the build runners seem more volatile so probably valuable to pin to more specific labels anyway (hopefully CI breaks less for us that way).

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looking good! left an question that doesn't block the PR so LGTM!

@jamescrosswell
jamescrosswell merged commit 8d4f28b into version7 Sep 16, 2026
39 checks passed
@jamescrosswell
jamescrosswell deleted the net11-rc1 branch September 16, 2026 01:40
@jamescrosswell jamescrosswell linked an issue Sep 17, 2026 that may be closed by this pull request
jamescrosswell added a commit that referenced this pull request Oct 19, 2026
* feat: add support for .NET 11 RC 2

Bumps the SDK, workload set and prerelease Microsoft.* package references
from RC 1 to RC 2.

The RC 2 Apple packs (27.0.12212) only accept platform version 27.0 and
require Xcode 27.0, so the iOS and Mac Catalyst TFMs move to 27.0 everywhere
the version is spelled out. The macos-26 runner image tops out at Xcode 26.6,
so the macOS jobs move to the preview xcode-27 image.

XHarness 26117.1's mlaunch can't start the simulator under Xcode 27, which
replaced Simulator.app with DeviceHub.app, and reports the failure as
APP_CRASH. 26506.3 handles it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(apple): adopt the UIScene lifecycle in the iOS and Mac Catalyst apps

Apps built with the Xcode 27 SDKs must use the UIScene lifecycle. Without it
Sentry.Samples.Maui sat on the launch screen on an iOS 27 simulator, and the
device test and integration test apps would have done the same.

The MAUI apps get the manifest and an empty MauiUISceneDelegate subclass,
as in the MAUI RC 2 templates. Sentry.Samples.Ios builds its UI in the
SceneDelegate it already had.

UIKit doesn't call application-level activation callbacks under scenes,
so the integration test app's OnActivated hook moves to its SceneDelegate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(maui): report in_foreground for apps using the UIScene lifecycle

Sentry.Maui set InForeground from the application-level OnActivated,
OnResignActivation and DidEnterBackground events. For apps using the UIScene
lifecycle, which Xcode 27 requires, MAUI raises SceneOnActivated and friends
instead, so InForeground stayed null and in_foreground disappeared from every
iOS and Mac Catalyst event.

The iOS integration test now asserts "in_foreground":true; without the
Scene* handlers it fails in both Release and Debug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(apple): upload framework symbols only from the assemblies that ship

#5566 collected framework PDBs from both "linked" and
"postprocessed-assemblies", assuming only one exists per SDK. .NET 11 RC 2
writes both. The post-processor rewrites some assemblies (Microsoft.MacCatalyst,
Microsoft.Maui.Controls and Microsoft.Maui.Essentials in the MAUI sample) and
gives them new PDB IDs, and only the postprocessed copies end up in the app
bundle. So every PDB was uploaded twice, and the "linked" copies of the
rewritten assemblies matched nothing that ships.

"linked" is now only the fallback for SDKs without
"postprocessed-assemblies". cli.Tests.ps1 compares file names with
Sort-Object -Unique, so it couldn't catch this; it now asserts that nothing is
collected from "linked".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: upload symbols and create releases when publishing Native AOT with the .NET 11 SDK

From RC 2 the .NET 11 SDK publishes Native AOT apps without running Build:
UseOptimizedPublish defaults to true when PublishAot is set, and Publish
depends on _PublishOptimizedBuildAlternative, which runs only Compile and the
publish targets (dotnet/sdk#54515). CheckSentryCLI, which every upload and
release target depends on, hooked AfterTargets="Build", so the symbol upload
silently stopped. This is decided by the SDK, not the TFM, so net8.0-net10.0
apps published with the .NET 11 SDK are affected too.

CheckSentryCLI and the release targets now also run after
_PublishOptimizedBuildAlternative. Caught by the native AOT publish cases in
cli.Tests.ps1, which failed for both net10.0 and net11.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: extend the .NET upgrade checklist with the RC 2 breakages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: keep only the recurring RC 2 lessons in the upgrade checklist

Drops the UIScene row, a one-off Apple requirement. Trims the XHarness
row to the part that recurs, and folds the AOT publish and trimmer
directory rows into one row about symbol upload depending on SDK
internals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update src/Sentry/buildTransitive/Sentry.targets

* fix(maui): keep in_foreground true while another window is active

Opening a second window on iPad fires SceneOnResignActivation and
SceneDidEnterBackground for the first scene after SceneOnActivated for the
second, so InForeground ended up false while the app was in use. Resign and
background now leave it true if another connected scene is ForegroundActive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for .NET 11 RC 1

2 participants