Repository navigation
Fix Windows debugging failure with .NET 10 SR13 - #39830
Merged
kubaflo merged 4 commits intoNov 2, 2026
Merged
Conversation
devanathan-vaithiyanathan
temporarily deployed
to
copilot-pat-pool
November 2, 2026 13:40 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39830Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39830" |
This comment has been minimized.
This comment has been minimized.
devanathan-vaithiyanathan
temporarily deployed
to
copilot-pat-pool
November 2, 2026 13:40 — with
GitHub Actions
Inactive
devanathan-vaithiyanathan
temporarily deployed
to
copilot-pat-pool
November 2, 2026 13:41 — with
GitHub Actions
Inactive
devanathan-vaithiyanathan
temporarily deployed
to
copilot-pat-pool
November 2, 2026 13:43 — with
GitHub Actions
Inactive
devanathan-vaithiyanathan
temporarily deployed
to
copilot-pat-pool
November 2, 2026 13:45 — with
GitHub Actions
Inactive
devanathan-vaithiyanathan
temporarily deployed
to
copilot-pat-pool
November 2, 2026 13:45 — with
GitHub Actions
Inactive
devanathan-vaithiyanathan
marked this pull request as ready for review
November 2, 2026 13:51
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Native Windows Debug/Release and theme-transition testing is needed to confirm the Shell startup resource-ordering change resolves the COMException and preserves theme updates, which source-only review could not verify.
No open issues 🎉
What changed in this PR
Addresses the Windows Shell initialization crash reported in #39801 for .NET 10 SR13 by avoiding a second overwrite of disabled-foreground resources after WinUI refreshes them.
Changes:
- Apply disabled text colors within existing resource updates, preserving public method signatures and fallback behavior.
- Pass the disabled color from the Shell handler while retaining separate propagation to item view models.
- Add Windows device tests covering applying, changing, and clearing the disabled color, with and without explicit text colors.
| File | Description |
|---|---|
src/Core/src/Platform/Windows/NavigationViewExtensions.cs |
Consolidates disabled-foreground resource updates through internal overloads. |
src/Controls/tests/DeviceTests/Elements/Shell/ShellTabBarTests.Windows.cs |
Tests disabled-color changes and restoration of original brushes. |
src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs |
Supplies disabled colors to selected and unselected text-color updates. |
Review effort: Balanced
kubaflo
approved these changes
Nov 2, 2026
kubaflo
added a commit
that referenced
this pull request
Nov 2, 2026
) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> Port the exact Windows fix and regression coverage from #39830, merged into `release/10.0.1xx-sr13` as `94fa72b3d91a979ec02fa335c1e37a70e7eb837e`, onto `main`. Shell appearance updates refreshed WinUI's disabled-foreground resources through the existing text-color methods, then overwrote the same entries in `UpdateTopNavigationViewItemDisabledColor()`. The second resource-dictionary update caused the Shell initialization crash reported in #39801. The port: - Applies effective disabled paint during the existing selected/unselected text-color resource updates, without the later overwrite. - Preserves both public text-color methods through internal overloads; the separate disabled-color method still updates tab view models and nested items, preserving disabled icons and fallback behavior. - Preserves the two-case Windows regression theory that applies, changes, and clears `TabBarDisabledColor`, both with and without explicit text colors. No conflict-resolution changes or new public APIs. The three-file diff is patch-equivalent to #39830: stable patch ID `3f29f44e43be2732794b22470e4def1cb8205697` (98 additions, 17 deletions). Fresh main ancestry, patch-equivalence checks, and searches of open/recently merged PRs found no existing main equivalent. #### Validation **Passed:** ```sh dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs src/Core/src/Platform/Windows/NavigationViewExtensions.cs src/Controls/tests/DeviceTests/Elements/Shell/ShellTabBarTests.Windows.cs --verbosity quiet dotnet format whitespace --folder --include src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs src/Core/src/Platform/Windows/NavigationViewExtensions.cs src/Controls/tests/DeviceTests/Elements/Shell/ShellTabBarTests.Windows.cs --verify-no-changes --verbosity quiet git diff --cached --check ``` Roslyn syntax parsing with the `WINDOWS` preprocessor symbol also passed for all three changed files. These are static checks, not a Windows build or runtime result. **Blocked on this macOS host:** ```sh pwsh -NoProfile .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform windows -TestFilter 'Category=Shell' -IncludeClasses Microsoft.Maui.DeviceTests.ShellTests -IncludeMethods TabBarDisabledColorCanBeAppliedChangedAndCleared ``` The runner exits before building: `Platform 'windows' is not supported on this OS`. ```sh dotnet build src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj -f net11.0-windows10.0.19041.0 --no-restore -p:EnableWindowsTargeting=true -p:IncludeWindowsTargetFrameworks=true -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false --nologo -v:quiet dotnet build Microsoft.Maui.BuildTasks.slnf --nologo -v:quiet ``` The cross-build stops at missing MAUI MSBuild tasks. Building those prerequisites fails with `NETSDK1140`: installed Apple workloads support 26.5, while main requires 27.0 (the installed SDK is an older .NET 11 preview). No successful compile or Windows test result is claimed. Source PR #39830 records Windows manual testing; this main-targeted port still requires Windows CI/runtime validation. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #39801 Ports #39830 to main. <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
5 tasks done
3 tasks done
kubaflo
added a commit
that referenced
this pull request
Nov 13, 2026
…on backports (#40217) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change **Explicit release-target exception:** this PR intentionally targets the new `release/10.0.1xx-sr14` branch. `main`, `net11` and the inflight lanes are now .NET 11, so .NET 10 SR14 is cut from the SR13 release head (`release/10.0.1xx-sr14` was created at `54d76458e0`, the tip of `release/10.0.1xx-sr13`, which already includes all post-cut SR13 fixes #39830, #39855, #39879, #39891 and the servicing/stable configuration from #39774). This PR brings the .NET 10 changes needed since SR13: 1. **Backport #39887** – `[Windows] Prevent duplicate Shell startup navigation from stale tab selection events`. Fixes #39859 (regressed in 10.0.120); it was merged only to `main`. Clean `cherry-pick -x`. 2. **Backport #40132** – `Fix custom Shape.PathForBounds dispatch regression`. Fixes #40129 (regressed in 10.0.130); it was merged only to `candidate/11.0.1xx-sr2`. The unrelated .NET 11 `eng/release-rollover.json` change from that commit is excluded (file does not exist on the .NET 10 line). 3. **Version bump** – `PatchVersion` 130 → 140 in `eng/Versions.props`. Servicing label and `StabilizePackageVersion=true` are inherited from SR13. Reviewed and intentionally **not** included: - #40136 (`net10.0` Publish-Build-Assets cleanup): SR13 has no `Publish-Build-Assets` references, so nothing to remove. - #39882 (re-land of the CollectionView2 height fix): SR13 already carries the revert #39855 that fixed #39847; re-landing is a fix-forward, not a regression fix. - #40213 (`[net10.0][XSG]` CA2252 suppression, issue #40045): still open/unmerged; can be backported once approved. - Other `regressed-in-10.0.1x0` issues closed since the SR13 cut (#38622, #39557/#39681, #39722) are already fixed on SR13 or were fixed outside MAUI. Keep in draft pending review and CI. This PR does not tag, publish, or authorize a release; the internal dnceng mirror of `release/10.0.1xx-sr14` has not been created. #### Validation Using the pinned SDK `10.0.113` provisioned by `eng/common/dotnet.sh`: - `dotnet msbuild eng/Versions.props -getProperty:PatchVersion,SdkBandVersion,PreReleaseVersionLabel,StabilizePackageVersion,DotNetFinalVersionKind` → `140`, `10.0.100`, `servicing`, `true`, `release`. `xmllint --noout eng/Versions.props` passed. - `dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj -f net10.0 --filter FullyQualifiedName~StrokeShapeTests` (platform TFMs disabled): **passed 59/59**. With `Shape.cs` reverted to SR13: **failed 3/59** (the new `CustomShapeReimplementingIShape*` tests); restored: **passed 59/59**. - #39887 is Windows-only (`ShellItemHandler.Windows.cs` + Windows device test) and was not built locally on macOS; it relies on CI. ### Issues Fixed Fixes #39859 Fixes #40129 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
This was referenced Nov 24, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details:
Windows applications using the SR13 build crash during Shell initialization.
Root Cause:
The Shell appearance update first populated and refreshed WinUI’s disabled-foreground resources through the existing text-color methods. The newly added UpdateTopNavigationViewItemDisabledColor() then overwrote those same resource entries. The observed COMException occurred during this second resource-dictionary update.
Description of changes
Issues Fixed
Fixes #39801
Tested the behavior in the following platforms.