Skip to content

[net11] Restore promotion builds and native test coverage - #39779

Merged
kubaflo merged 30 commits into
net11.0from
kubaflo-net11-compilation-prerequisite
Nov 1, 2026
Merged

kubaflo merged 30 commits into
net11.0from
kubaflo-net11-compilation-prerequisite

Conversation

@kubaflo

@kubaflo kubaflo commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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!

Description of Change

This prerequisite intentionally targets protected net11.0, so #39688 inherits corrections through reviewed integration rather than bypassing branch protection. Current publication status: full current-head CI is not yet all-three-pipeline green. Both owned correction refs remain at actual #39779 published head 691808743d1b3915c9af359c9a37dae0588f51c2; GitHub REST confirms that head and the parent checkout is clean. Exact-source device1657679 completed succeeded all9/9 jobs at 2026-10-31T12:28:45.1319334Z. Exact-source maui-pr1657678 remains running with29/31 jobs passed; UI1657680 remains running with genuine current iOS badge failures, a distinct Catalyst DNS setup failure, and other work still running. The fresh current native audit has61 remaining app XMLs pending review: all9 Helix job Finished fields are nonnull, all71 work items are finished with exit0, and the62-XML catalog exists, but no parsed current pass certification is claimed yet; the complete f26 all62 audit below remains older-head evidence only. Azure triggerInfo.pr.sourceSha is 691, while 92a13b… is the merge SHA, not the source head. Protected net11.0 and #39688 remain at c13dddb0a6b5b57a31a7fed4d4779dc01b31a9ef; no bypass, force-push, approval, or merge occurred. #39688 receives these fixes only after #39779 passes required checks and is merged with explicit user authorization.

Current 691 iOS Mono same-code recovery receipt: device1657679 OS26 Mono General completed1292=1278 passed+14 existing skips+0 failures/errors, with all declarations reconciled. Exact MemoryTests_TabbedViewHandler.WindowDoesNotLeak("Window Does Not Leak") passed in0.2446597s on dci-mac-build-475; receipt: parent files/691-ios26-general-results.xml. The current Window test, helper, and40-GC behavior are unchanged from historical d673, where the same case failed in1.1958577s, and from the passing f26/local cohorts. This fresh same-code cohort recovery is not a root-cause fix, certified undo experiment, product patch, or evidence for changing the fixture, helper, GC count, wait budget, or skip. Native iOS Mono raw138 succeeded with0 errors; OS26 job ea1e82de… and OS15 job 54d03775… both have8 finished work items. The other15 app XMLs remain pending audit, so no complete current native-report certification is claimed.

Current 691 Catalyst UI setup receipt: UI1657680 Catalyst Shell1 task bcc8dcd8-bcf8-5783-51a6-38f65fe366c5 / raw2612 failed before tests while downloading the MSBuild logger ZIP from vstsagenttools.blob.core.windows.net: DNS reported nodename nor servname provided, or not known; telemetry to dev.azure.com also recorded DNS failure. Both attempts produced no readable NUnit XML or TRX, so the native Shell1 cases are unmeasured, not four badge-test failures or evidence of a native product bug or global outage. The Catalyst UI stage remains running and no stage2 retry has been admitted; classification waits for stage completion and all failures. No network, runtime, source, URI, timeout, budget, or configuration change is claimed.

Current 691 iOS badge visual-failure receipt: UI1657680 iOS CoreCLR latest Shell1 raw4524 and publisher4526 completed initial173=163 passed+6 existing skips+4 failures; the exact four-case targeted NUnit retry completed4 failures+0 passes. Run46147754 reports result100169 ShellBadgeCanBeCleared at2.30%, result100170 InitialBadgeIsVisible at2.31%, result100171 SetAtRuntime at2.31%, and result100172 MultipleTabsCanHaveBadges at2.31%; all four retained the same percentage across both attempts and the publisher recorded four real failures. Parent receipts: files/691-ios-shell1-failed4524.log and files/691-ios-shell1-publisher4526.log. This is a current native iOS badge visual mismatch, distinct from Catalyst Shell1's DNS pre-test failure with no XML. No new expected colors, precise underlying mechanism, golden change, mask, tolerance, or skip is claimed before current-image inspection.

Historical superseded d673 native/UI receipt: on device1657603 iOS Mono raw141, OS26 General completed1292=1277 passed+14 existing skips+1 failure: MemoryTests_TabbedViewHandler.WindowDoesNotLeak, with the Window alive at1.1958577s. The same exact OS26 case passed on f26 in0.1247654s. The source creates ContentPage, not TabbedPage (the latter appears only through inherited registration), so no Tabbed product root, infrastructure cause, isolated local red, runtime/SDK/source fix, helper change,40-GC change, skip, or wait-budget change is claimed. A fresh local original-fixture iOS Mono Core simulator OS26.5 XML completed65=64 passed+1 existing skip, with the exact Window case passing in0.2360164s; the wrapper exited1 only because it expected testResults.xml while the verified fresh output was xunit-test-*.xml. An initial build without the existing CI opt-in stopped at NETSDK1242/no tests and is not red; the successful run used the existing UseMonoRuntime=true and _DisableCheckForUnsupportedMonoMobileRuntime=true settings from stage-device-tests.yml. Current 691 native CI is rerunning the case. Historical d673 main1657602 was canceled after the new-head push, after only partial progress (seven base jobs while integration work was still running); no all-green claim is made. The old observer exited on a JSON-read error while fetching the canceled timeline, which is not a test failure.

Historical superseded d673 Windows focus/color receipt: Windows Shell2 run46144002 completed197=183 passed+13 existing skips+1 failure. Exact result100185 CancelButtonColor passed its strict Focused precondition and unchanged new golden, providing native acceptance for that focus/color case only. Sole failure result100195 Uppercase failed both attempts visually at0.70%; actual attachment17 (01e09879…,22830 bytes) and AX (3d424a28…) prove HasKeyboardFocus=True, FocusStatus=Focused, and exactly195 RGB changes in bbox (168,266)-(217,276), confined to the event label versus an empty-label golden, with zero changes outside it—including all uppercase glyphs and colors. The 691 update makes the strict Focused.After(2000,100) assertion unconditional inside the existing Windows-only outer guard and updates only those195 label pixels; it changes no scope, skip, tolerance, mask, or uppercase visual requirement. The native PNG is byte-identical to the captured actual. Managed WinUI test build passed before publication with0 warnings/errors in23.75s and after publication via ./.dotnet/dotnet build src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj -c Release --no-restore -v:q with0 warnings/errors in18.26s; original PNG byte comparison, scoped formatting, and git diff --check passed, with three unrelated formatter whitespace changes restored. Actual execution of the new 691 assertion remains pending fresh CI; this is not full UI certification. Historical d673 iOS Shell1 raw4295/publisher4310/run46144012 still has the same four badge failures (173=163 passed+6 skips+4 failures; targeted retry4/4 failed), with no safe badge fix or golden change.

Historical superseded cd main-gate receipt: maui-pr1657489 completed succeeded at 2026-10-31T09:39:23.6411636Z. The fresh complete Azure timeline contains1233 records and verifies31/31 jobs succeeded, with no skipped or failed jobs. The run is qualified to exact historical counterpart source cd7a8cb8a21c8d798c9588da7ec86a3ae54379df; the original source Windows Pack raw267 records190 warnings/0 errors. This closed only the main gate on that historical head, not all-three-pipeline promotion acceptance or current 691 certification. Earlier main-running/29-or30-of31 statements below are preserved historical checkpoints superseded by this complete receipt and the current publication status above. Historical cd devices failed7/9; historical cd UI had genuine failures. Combined 79 manual1657568 and f26 manual1657552 remain historical scoped evidence, not current certification.

Current-head device failures

Device1657491 Android Mono raw149, Helix job prefix 76c02089, contains actual Core XML3090=3017 passed+72 existing skips+1 failure. Exact AssertionExtensionsTests.EarlierReferenceCollectedDuringLaterWait(useWaitForGC: True) failed in4.999277s with System.Object retained. The other four actual app XML reports are Controls1345=1332 passed+13 existing skips, Essentials424/424 passed, Graphics33/33 passed, and Blazor68=64 passed+4 existing skips. Parent receipt: files/cd-device-android-mono-149.log plus native XML.

Windows raw165, Helix job prefix 5ded47b7, records pre-test Add-AppxPackage failures for Controls-packaged a000OR5 and Core-packaged a000ORS: 0x80073CF0, missing AppxManifest/0x80070003, raw console lines59-60. These work items have no XML: their native cases are unmeasured, not product-test failures or proof of an infrastructure outage. Parent receipt: files/cd-device-windows-165.log.

The parent independently matched and ported already-validated isolated #39529 commit prefix f11b88966, identical fixture blob 132ef9846b52df6bf59b7fb29c1317a5c24d31cc: one fixture file,25 added/13 removed lines, with a stronger real-later-reference-alive assertion. There are no helper,40-GC, case or runtime changes. After validation, this port was committed as f26c935851d398ea5cb4e4415fbe0c2f0fa6e4e4 and normally pushed only to parent branch kubaflo-net11-promotion-compile-fixes. The #39779 counterpart remains exactly cd to preserve ongoing native UI receipts; it has not inherited this port. Historical f8 successes below remain separate.

Parent-only GC port and manual validation scope

Native full Core Android Mono AOT rebuild after the port passed in96.94s with6 existing warnings/0 errors, producing native APK ABIs. The existing runner temporarily injected only the exact-class module initializer; no injection was committed. Three fresh native Mono AOT ARM64/API34 processes each passed the same9/9 cases with0 failures/skips, including both regression variants and seven safety cases; these are three processes, not27 distinct tests. A fourth post-push process passed the same9/9. The old ARM64/API34 AOT fixture also passed9/9 in one explicit-instrumentation process, so no local baseline-red or isolated local causality is claimed. The actual published cd x64 Mono True-variant CI failure above and original #39529 causal controls support the port; ARM64 local preservation does not certify x64 or current PR CI.

Exact commands/results supplied by the parent:

PATH="$PWD/.dotnet:$PATH" DOTNET_ROOT="$PWD/.dotnet" UseMonoRuntime=true _DisableCheckForUnsupportedMonoMobileRuntime=true pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -IncludeClasses Microsoft.Maui.DeviceTests.AssertionExtensionsTests -TestFilter Category=Memory -DeviceUdid emulator-5554 -Rebuild -BuildOnly -OutputDirectory /Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/gc-upstream-fixed-build

Passed full native Core rebuild96.94s,6 existing warnings/0 errors, Mono AOT/native APK. Baseline used the identical build command without -BuildOnly, with output directory files/cd-gc-baseline: build passed, but the default runtime invocation printed Android AM help/exit82 and produced no XML/no tests. That invocation is not native acceptance, a crash or causal red.

for repeat in 1 2 3; do
 ./.dotnet/dotnet /Users/kubaflo/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26517.1/tools/net11.0/any/Microsoft.DotNet.XHarness.CLI.dll android test --app artifacts/bin/Core.DeviceTests/Release/net11.0-android/com.microsoft.maui.core.devicetests-Signed.apk --package-name com.microsoft.maui.core.devicetests --instrumentation com.microsoft.maui.core.devicetests.TestInstrumentation --device-id emulator-5554 --output-directory "/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/gc-fixed-$repeat" --timeout 00:05:00 --arg TestFilter=Category=Memory --arg "results-file-name=gc-fixed-$repeat.xml"
done

Each XHarness invocation exited0; each actual XML reports9/9 passed,0 failures/skips, exclusively the exact class. Post-push used the identical single XHarness command without the loop, output directory files/gc-fixed-postpush and --arg results-file-name=gc-fixed-postpush.xml: exit0, actual XML9/9 passed. The baseline explicit-instrumentation single command used files/cd-gc-baseline-explicit and --arg results-file-name=cd-gc-baseline-explicit.xml: old ARM64/API34 AOT fixture9/9 passed, not local red.

  • ./.dotnet/dotnet format Microsoft.Maui.sln --no-restore --include src/Core/tests/DeviceTests/AssertionExtensionsTests.cs --exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet — passed.
  • git diff --check — passed.
  • git hash-object src/Core/tests/DeviceTests/AssertionExtensionsTests.cs — returned exactly 132ef9846b52df6bf59b7fb29c1317a5c24d31cc, matching the original upstream f11 source blob.
  • az pipelines run --org https://dev.azure.com/dnceng-public --project public --id 314 --branch refs/heads/kubaflo-net11-promotion-compile-fixes — admitted manual device1657552, reason manual, exact sourceVersion=f26c935851d398ea5cb4e4415fbe0c2f0fa6e4e4. Admission is not a full native pass and is not [net11] Restore promotion builds and native test coverage #39779 current CI.

Only that fixture file was committed and parent-only pushed. Shared helpers,40-GC behavior, cases, runtime, skips, production and APIs are unchanged. Current cd device1657491 remains failed7/9 jobs; main/UI remain running. No counterpart push or current-CI fix is claimed.

Latest restore serialization and Windows focused-state oracle

The 565 correction adds only seven lines in eng/Build.props, setting default ProjectToBuild.RestoreInParallel=false. Original f8 Pack Windows build1657400/raw262/binlog prefix 8a3d7198 demonstrated concurrent BuildTasksOnly portable/full Package restores overwriting shared assets evaluated for different target frameworks. This serializes those restores without changing the existing build-task/full ordering. Native isolated build1657433 Pack Windows/raw267 succeeded with190 warnings/0 errors; after-binlog SHA 133fbcbb3eac09bf0a97de3891791e5e2cbffcecd57d4c30bb322d5cff6294c5, ExecuteMSBuild task78, confirms RestoreBuildInParallel=False. Pack Mac also succeeded. No pipeline tests are added and no speculative stream-owner/locking patch is included.

Current-head native packing acceptance: on actual PR build1657489, both Pack Windows and Pack macOS succeeded. The parent verified triggerInfo.pr.sourceSha=cd7a8cb8a21c8d798c9588da7ec86a3ae54379df using az. Windows raw log267 records Build succeeded at line2192,190 warnings at line2405 and0 errors at line2406, with packages published and Finishing: Pack & Publish; receipt: parent files/cd-native-windows-pack-267.log. This validates serialized restore on the actual current cd PR head, not only the earlier isolated 565 manual run. Overall main1657489/UI1657492 remain running and device1657491 completed failed7/9 jobs; this is not an all-green claim. The new Windows focused-state oracle now fails before the screenshot, as recorded below; there is no native UI acceptance.

cd7a8cb8a21 changes only the Windows CancelButtonColor test and its native golden. All195 exact RGB differences between the old expectation and native capture are confined to FocusStatus, formerly empty versus source-required Focused; there are zero differences outside that label, and the orange cancel-button rectangle is pixel-identical. Native AX reports HasKeyboardFocus=True; the source Focused handler writes Focused, and the test taps, clears and types Testing. A Windows-only delayed assertion requires that label before the screenshot (2s/100ms), then only those195 label pixels are reconciled. The unchanged actual local comparer reported0.70% against the old image while CI reported0.76%; these are not identical metrics. The new image matches locally. No cancel-color production import, color change, threshold relaxation or skip is included. Managed Windows NUnit test compilation is not Windows UI runtime acceptance.

Current cd UI failure receipts: Windows Shell2 raw4404, publisher4408/run46141148, exact result100193, fails the strict Focused assertion with an empty label in both initial and retry attempts before the screenshot. Complete197 results=183 passed+13 existing NotExecuted+1 failure; every other ShellSearch case passes, including Uppercase. Fresh AX attachment3, prefix caf50e45,22176 bytes, shows Edit AutomationId=TextBox, HasKeyboardFocus=True, while the FocusStatus TextBlock Name is empty. Thus there is no native cancel-orange or new-golden acceptance: this is focus-ownership/event-metadata divergence, not a visual-color fix. It matches the peer cc6248 line-owner-clear/new-focus-sync mechanism, but that implementation is not imported; original corrected native-fixture SHAs are awaited.

Latest iOS26.5 CoreCLR Shell1 raw4463, publisher4467/run46141232, has initial173 results=163 passed+6 existing skips+4 same badge failures. All four failures were selected for targeted retry; no retry acceptance is claimed. Unsupported badge probes remain rejected, with no safe fix or badge-golden change. Overall main/UI remain running and current cd devices remain failed7/9 jobs.

Latest exact commands/results, supplied by the parent session:

  • ./build.sh -restore -ci -configuration Release -warnAsError false /p:SkipInitInternalTooling=true /p:ValidateXcodeVersion=false /bl:/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/restore-race-after.binlog — passed after 565,0 warnings/0 errors,5.97s.
  • ./build.sh -restore -ci -configuration Release -warnAsError false /p:SkipInitInternalTooling=true /p:ValidateXcodeVersion=false /bl:/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/restore-race-postpush.binlog — passed after publishing 565,0 warnings/0 errors,5.78s.
  • ./build.sh -restore -ci -configuration Release -warnAsError false /p:SkipInitInternalTooling=true /p:ValidateXcodeVersion=false — passed after publishing cd,0 warnings/0 errors,7.83s.
  • ./.dotnet/dotnet build src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj -c Release -v:q — passed before cd,0 warnings/0 errors,37.17s.
  • ./.dotnet/dotnet build src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj -c Release -v:q --no-restore — passed after publishing cd,0 warnings/0 errors,22.04s. These are managed test-compilation results, not Windows-native UI runs.
  • ./.dotnet/dotnet format whitespace Microsoft.Maui.sln --no-restore --include src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellSearchHandlerFeatureTests.cs --verbosity quiet — passed. Three unrelated trailing-whitespace edits were restored; final C# diff is only five added lines.

Latest complete earlier-head native evidence

Native f8 device1657401 completed all9/9 Helix jobs, with62 complete XML reports:46,202 tests=44,980 passed+1,222 existing exclusions,0 failures/errors. This is earlier-head evidence, not certification of cd.

Native f8 Mac Entry raw4511/publisher4517/run46138420 completed121=118 passed+3 existing exclusions,0 failures/errors; all four previously failing targets passed. This replaces the earlier pending native Mac acceptance status below. Native Mac CollectionView1 raw4182/publisher4185/run46137950 completed69=68 passed+1 existing exclusion,0 failures/errors. The black-capture cases recovered in a fresh-worker cohort; no precise cause or source black-capture fix is claimed.

Windows CV1 raw4562/publisher4564/run46138612 completed355 final results=341 passed+13 existing exclusions+1 real Horizontal Issue38059 failure; nine setup cases recovered. All13 updated expectations and Issue36422's post-screenshot position assertion passed. Horizontal layout still shows the wrong two vertical columns instead of the required horizontal span4; its golden is not refreshed and no Windows production layout patch is included.

f8 Shell2 Windows run46138102 failed CancelButtonColor at0.76% in both attempts before the focused-label correction. f8 iOS badge tests failed in both attempts with2.30%/2.31% differences. The source-required blue/green badge still renders red through the native API; the limitation remains unresolved, and all unsafe probes were removed.

Initial f8 main1657400 Pack failed as described above. Its Helix Resizetizer DebugColorizedWithNamed DeleteTMP IO failure had native796 results=793 passed+2 existing exclusions+1 failure. Debug monitor303 resubmitted only the failed unchanged work item as 6e8fd615-2895-4b7e-8c4c-cb58d1529722; the monitor passed with0 failed and uploaded339 logical results, not a native result count. The parent has now verified native retry receipt files/f8-resizetizer-debug-retry-results.xml:796=794 passed+2 existing skips,0 failures/errors. Exact SVG test type Microsoft.Maui.Resizetizer.Tests.SkiaSharpSvgToolsTests+Resize, method ColorizedWithNamedReturnsColored, passed in0.3028857s; this is not the same-named raster test. Source log303 confirms only one failed work item was resubmitted with unchanged payload. This is historical f8 native recovery, not current cd CI certification. No IO-lock source/infra attribution or full current-head native pass is claimed.

The sections below retain the detailed earlier implementation and validation history. Historical pending/in-progress statuses are superseded only by the exact newer results above; absent, partial and older-head measurements remain distinct.

Build and fixture corrections

  • Use the existing barBackground Paint in the iOS 26 tab-bar layout guard instead of nonexistent barBackgroundColor.
  • Qualify WinUI alignment enums and Thickness in NativeIconBadgeState. Extend the existing, narrowly scoped RS0030 exception to native-grid badge removal as well as insertion; these are WinUI Grid, not MauiPanel, so CachedChildren is unavailable. The analyzer stays enabled elsewhere.
  • Reuse explicit NavigationRenderer registration for the renderer-disposal continuation test, including inherited fixtures.
  • Remove concrete ShellRenderer callback assumptions from three Android icon tests. A virtual toolbar hook reuses native Shell's hierarchy traversal, preserving the original color/aspect-ratio/drawing assertions.

Raw az logs reproduce compile failures in1656326,1656328 and1656327/1656398, then native-grid analyzer errors in1656491/1656492 and inherited-fixture failures in1656522.

Reuse upstream implementations rather than duplicate them

Merge 597bb90b38e integrates original #39746 head 09afac82be8, retaining its four commits and authorship. Its parents are 1382f5f3980 and 09afac82be8. The sole conflict was independent additions in NavigationPageTests.iOS.cs; both the renderer-disposal tests/helper and original native shouldPopItem interop helper were retained. Navigation admission, cancellation, back-command and callback-count assertions are preserved. This is a feature-branch integration, not a protected GitHub PR merge.

Merge 43c74d473f1 retains original #39761 head 2583b4a48ee. Default appearance is captured before renderer initialization applies custom backgrounds. Lazy capture in both public SetAppearance methods is also preserved: removing that fallback broke8/16 unchanged native tests for direct tracker callers. With it, all16 pass and the combined navigation/Shell/appearance set passes556/556. The original two iOS reset expectations were exercised by the gradient-to-solid-to-default UI case.

Native tint regression and case-specific visual reconciliation

1382f5f3980 reapplies existing per-item icon-color logic after bottom-menu reconstruction. Previously, rebuilding tabs left the selected label magenta but its font icon dark, and explicitly colored font icons lost their color. Two native regressions cover selected/unselected tint, explicit source colors, rebuilding and subsequent selection. Native Shell exercises the shared manager too.

Visual changes have no tolerance relaxation, dropped assertions or new skips:

  • RTL Shell: exact net11 PNG restored from 7de2a9f24f9; native API30 build1654686/log3169 line1078 and corrected-source execution pass.
  • TabbedPage: reviewed native11 captions on the matching API30 profile after fixing actual tint. Independent bitmap-color assertions catch a color defect that occupies a small screenshot area.
  • SwipeView: original raster colors required by net11 GetIconTintColor semantics. No global fixture color override is included. The earlier pre-merge PNG restoration was superseded because main changed that fixture's layout. API30 and iOS26 captures preserve native raster colors; the iOS change is limited to the two grocery icons.
  • Windows default CV2 grouping/spacing: reviewed captures from run46111660/results100055/100056. CollectionView1 is a category shard, not a handler variant; the dedicated Windows CV1 stage is separate. All grouped data remains present and the first item is visible. Issue36422 additionally has a stable label AutomationId and an independent no-upward-shift assertion.

Strict UI recovery and SafeArea polling

baf64263282 reuses isolated upstream SafeArea commit 6e47ece4882 from #39742. Delayed constraints avoid recording intermediate NUnit failures while retaining 15 seconds / 500-ms polling / 1 pixel, subsequent checks and restoration.

The retry merger retained a discovery-time ignored BoxView case as failed after fixture setup failed, although the complete retry recovered ten cases and preserved the original ignore. Recovery now requires exact assembly/full-name identity, the same discovery-time ignore reason, a complete fixture, an actual pass and no cancellation. Ordinary failure-to-skipped still fails. Replaying unchanged real CI reports through the actual old/new C# helper changes219 passed/1 failed/1 not executed to219 passed/0 failed/2 preexisting not executed. No pipeline tests or new ignores are added.

Existing Material3 indicator fix retained in native Shell

907a4135c51 ports the existing #38445 UpdateActiveIndicatorColor callback to native ShellItemHandler; native TabbedPage already retains its theme subscription. The omitted Shell callback left light #E8DEF8 after a dark switch instead of #4A4458.

Only two API36 expectations are reconciled with current fixture color roles and native11 captions after correcting the actual indicator. Code-only native diff bounds are (313,2525)-(537,2638). With corrected expectations unchanged, removing only the production callback makes Shell fail again while TabbedPage passes. Open/recently merged work was checked, including #38611, whose default-capture mechanism is different.

Network-independent HTML history and retained diagnostic artifacts

7d49f3b5865 keeps the original initial HtmlWebViewSource, null BaseUrl and JavaScript anchor navigation, but navigates to a small bundled HTML document rather than an external GitHub page. Every navigation wait's returned Boolean is asserted; no history assertion is removed. On the native iPhone simulator, the fixture passes, fails with the original LoadHtmlString production history implementation, passes after restoration, and passes after publication.

a5ac3382e87 additionally resolves that document beneath Contents/Resources on Catalyst, matching the actual app-bundle resource layout while preserving the initial null BaseUrl. Hosted Mac WebView task4196 on build1657252 completed49/49; exact Issue30381 passed35s, with result and artifact publication successful. External-page accessibility was not measured during the earlier command timeout, so a precise earlier Catalyst hang cause is not claimed. The local Catalyst app compiled with0 warnings/errors; it was not launched through host XCTest.

7d49f3b5865 shortens only the isolated diagnostic-directory name, retaining the complete128-bit GUID as URL-safe base64. Raw Catalyst artifact log4422 proves TF205023:407-character retry attachment paths exceeded Azure's399-character limit. The directory shrinks from38 to24 characters, producing393-character paths. Artifact names/formats, separate raw evidence and retry behavior are unchanged. The actual UI Cake script compiles in dry-run mode. Subsequent ordinary Azure artifact publication succeeded, but that is not proof that the longest393-character retry path was exercised. No pipeline tests are added.

Qualified native expectations and Entry fixture isolation

f8f4e691aa9 changes only15 PNG expectations and one fixture line:

  • Thirteen Windows CV1-configuration expectations use exact native captures from build1657252/run46132638. Source requirements were reviewed independently: Issue23377 native AX rectangles measure exactly80-DIP item spacing rather than the old doubled spacing; Issue25859 retains10-DIP gaps; Issue23708 retains all5/5/3 grouped items; Issue39534 retains all eight full11-character dates after six swaps; delayed cards and vertical spacing preserve their required dimensions and complete visible items. Selected colors/items remain correct. The Issue38730 fixture explicitly uses CollectionView2, even in the CV1 configuration; its desktop three-column layout is not being mistaken for the legacy handler.
  • The two Mac appearance expectations retain the title transition, content geometry and restored default colors. Meaningful differences in the reset capture were confined to native navigation/tab-bar separator rows; the large-title capture differs in the native separator while preserving the standard title and body layout.
  • The Entry fixture calls EntryControl.Unfocus() before resetting its view model and pushing the options page. This is an editing-state isolation candidate. The three final Mac Entry failures passed in the initial attempt but failed during the full-fixture retry, with unexpected clear-button glyphs; their goldens remain unchanged. Four related iPhone-simulator tests passed before and after publication, and the Catalyst app compiles. Native Mac acceptance was pending at the initial checkpoint; compilation and iPhone preservation were not causal proof of a Mac fix. Later exact native Entry acceptance is recorded above.

All15 captures replay through the repository's unchanged MagickNetVisualComparer; all12 existing stale expectations reproduce their CI-reported differences, and nine deliberately corrupted controls remain rejected. This qualifies the image expectations; it is not a new end-to-end UI run. Issue36422's post-screenshot position assertion was still awaiting new CI at that checkpoint; its later actual pass is recorded above.

The incorrect Windows Issue38059 horizontal-grid expectation is deliberately not refreshed: both old and current captures show a two-column vertical grid despite the fixture replacing its layout with horizontal span4. No Windows handler patch is included. A local Windows build probe restored missing inputs but stopped at MakePri.exe with an execution-format error on macOS; no Windows build pass or native validation bypass is claimed.

No badge, black Mac capture, Windows RTL, or failing Entry expectation is refreshed. No public framework API, generated manifest or unrelated formatting churn is added. Imported navigation-manager interface changes are internal.

Validation commands and boundaries

  • git diff --check — passed for corrective commits and merge resolutions, including the latest change set.
  • ./.dotnet/dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Core/src/Platform/iOS/TabbedViewExtensions.cs src/Controls/src/Core/Toolbar/Toolbar.Windows.cs --verbosity quiet — passed with the pinned SDK. Scoped formatting was repeated for changed test/merge files; existing indentation was retained without whole-file whitespace churn.
  • ./.dotnet/dotnet format whitespace Microsoft.Maui.sln --no-restore --include src/Controls/tests/TestCases.HostApp/FeatureMatrix/EntryControl/EntryControlPage.xaml.cs --verbosity quiet — passed for the latest one-line fixture change at f8.
  • ./build.sh -restore -build -configuration Debug -projects "$PWD/Microsoft.Maui.BuildTasks.slnf" -warnAsError false — passed,0 warnings/errors, at the initial correction. The earlier relative-path attempt failedMSB3202; absolute-path retry passed.
  • ./.dotnet/dotnet build src/Core/src/Core.csproj -f net11.0-ios27.0 --no-restore --nologo -v:quiet — passed,0 warnings/errors, including integrated gesture code. Initial Preview6 NETSDK1140 was resolved by repository provisioning.
  • DEVELOPER_DIR=/Applications/Xcode-27.1.0.app/Contents/Developer ./.dotnet/dotnet build src/Controls/src/Core/Controls.Core.csproj -f net11.0-maccatalyst27.0 -c Debug -p:ValidateXcodeVersion=false -v:q — passed,0 warnings/errors, after appearance integration. An initial unversioned-target attempt failedNETSDK1005; the actual versioned target passed. Compilation is not a Catalyst-native test run.
  • DEVELOPER_DIR=/Applications/Xcode-27.1.0.app/Contents/Developer ./.dotnet/dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-maccatalyst -c Debug -p:ValidateXcodeVersion=false -v:q — passed,0 warnings/errors, for the resource follow-up and latest Entry candidate. No host XCTest launch.
  • Native Android fixture controls: Release CoreCLR ShellHandlerTests_Shell: fixed79/79; original callbacks76/79 with exactly three CI failures; restored79/79.
  • Native Android tint controls: API30 arm64 TabbedPageTests: fixed64/64; production callback removed62/64 with missing native magenta/lime pixels; restored64/64. Combined TabbedPage/native Shell143/143. Built through Run-DeviceTests.ps1 -Project Controls -Platform android -Configuration Release -BuildOnly -IncludeClasses ... and executed through pinned XHarness .TestInstrumentation; fresh XML identities/totals checked.
  • Focused API30 UI: BuildAndRunHostApp.ps1 -Platform android -Configuration Release -DeviceUdid emulator-5570 -TestFilter 'FullyQualifiedName~Issue38765|FullyQualifiedName~VerifyShellMenuItemsAlignedInRTL|FullyQualifiedName~VerifyCollectionViewContentWithIconImageSwipeItem|FullyQualifiedName~Issue36422' —4/4, including after publication, on1080x1920/420dpi with explicit serial, PLATFORM_VERSION11 and Pixel_2_API_30. Actual Appium device verified. Earlier API34 attempts failed unchanged profile guards and are not visual passes.
  • Apple disposal controls: both cases pass, reproduce InvalidCastException with original registration and pass after restoration. Full handler class fixed/restored23/27, reverted21/27 before the separate four gesture failures were integrated; hosted c0 XML confirmed disposal in inherited variants.
  • Combined native Apple: pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -Configuration Debug -iOSVersion 26 -DeviceUdid AA7BCC0E-CD5B-481A-BF91-402EB2CDFD6C -SkipXcodeVersionCheck -IncludeClasses 'Microsoft.Maui.DeviceTests.NavigationPageTests,Microsoft.Maui.DeviceTests.NavigationPageNavigationHandlerTests,Microsoft.Maui.DeviceTests.ShellTests,Microsoft.Maui.DeviceTests.ShellNavigationHandlerTests,Microsoft.Maui.DeviceTests.SafeShellTabBarAppearanceTrackerTests,Microsoft.Maui.DeviceTests.ShellNavBarAppearanceTrackerTests' — fresh XML556 passed/0 failed, exact counts27+27+243+243+10+6. Appearance repeated16/16 after publication. XHarness wrapper exits1 because it expects testResults.xml while fresh output is xunit-test-*.xml; no successful wrapper invocation is claimed. iPhone11Pro/iOS26.5 uses supported Xcode27.1 override, not exact CI Xcode certification.
  • Focused iOS UI: existing gradient, reset, orientation, keyboard and raster cases5/5. No physical Apple or host XCTest UI automation.
  • Material3: ./.dotnet/dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net11.0-android -c Release -t:Install -p:UseMaterial3=true '-p:AdbTarget=-s emulator-5570' -v:q — passed on isolated API36 Pixel3XL arm64,1440x2960/560dpi. PLATFORM_VERSION=16 DEVICE_SKIN=pixel_3_xl ANDROID_SERIAL=emulator-5570 DEVICE_UDID=emulator-5570 ./.dotnet/dotnet test src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj -c Release -p:UseMaterial3=true --filter 'FullyQualifiedName~Issue38234' — original0/2 with CI-identical1.27%/2.55% differences; fixed2/2; callback removed1/2 precisely Shell; restored2/2 and post-push2/2. Initial capability36 selected no device; OS version16 selected verified API36.
  • Bundled HTML history: DEVELOPER_DIR=/Applications/Xcode-27.1.0.app/Contents/Developer ValidateXcodeVersion=false pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -Configuration Debug -DeviceUdid AA7BCC0E-CD5B-481A-BF91-402EB2CDFD6C -TestFilter 'FullyQualifiedName~Issue30381' —1/1; original history production behavior reverted0/1 with Expected True/Actual False; restored1/1; post-push1/1. Temporary production change is removed.
  • Entry candidate preservation: DEVELOPER_DIR=/Applications/Xcode-27.1.0.app/Contents/Developer ValidateXcodeVersion=false pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -Configuration Debug -DeviceUdid AA7BCC0E-CD5B-481A-BF91-402EB2CDFD6C -TestFilter 'FullyQualifiedName~VerifyTextWhenFontSizeSetCorrectly|FullyQualifiedName~VerifyPlaceholderWithShadow|FullyQualifiedName~VerifyEntryControlWhenPlaceholderTextSet|FullyQualifiedName~VerifyClearButtonVisibilityWhenIsReadOnlyTrue' — exact4/4 passed before and after publication of f8f4e691aa9; fresh TRX names/outcomes checked. This is not Mac runtime acceptance.
  • Cake configuration: DOTNET_ROLL_FORWARD=Major ./.dotnet/dotnet tool run dotnet-cake eng/devices/ios.cake --target=uitest --dryrun --configuration=Debug --project="$PWD/src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj" --appproject="$PWD/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj" — passed; no tasks executed. Actual directory expression measured24 characters and observed path393<399.

Current hosted gates and unresolved failures

Current exact cd7a8cb8a21 runs are maui-pr1657489, completed succeeded31/31 jobs, UI1657492, still running with genuine failures, and device1657491, completed failed7/9 jobs with the exact native Core failure and unmeasured Windows deployment work items recorded above. Source SHA is verified; no all-three-gate green claim is made. The earlier f8f4e691aa9 runs were maui-pr1657400, device1657401 and UI1657402, all admitted with the exact earlier source SHA; complete newer evidence from those runs is recorded above.

On previous a5ac3382e87, main1657242 succeeded31/31, finishing2026-10-31T04:18:36UTC, and device1657251 succeeded9/9, finishing04:11:27UTC. All62 actual native app/queue reports were independently audited:46,202 tests=44,980 passed+1,222 existing exclusions,0 failures/errors. Two Windows FlexLayout reports had zero selected tests and are explicitly not passing measurements. Unchanged-payload targeted retries recovered Android Mono Essentials (exact424/424 x86), a Catalyst queue timeout where Core had never executed, and a pre-test Windows MSIX deployment failure. Both exact published MSIX files had valid CRC/manifests and matching x64 runtime dependencies; no speculative package/file-lock/source fix or worker-cause claim is made.

On prior907a, main1657009 completed31/31 and device1657010 completed all nine raw-submission-correlated Helix jobs, including Windows Graphics packaged/unpackaged. A transient Windows Release Resizetizer sharing violation recovered through one targeted failed-monitor retry: only the failing work item was resubmitted with unchanged payload; complete XML796=794 passed+2 original skips, including both exact ResizeQuality cases. No speculative file-lock source fix or infrastructure cause is claimed.

UI still needs repair. The final Mac CollectionView category on1657252 published69 initial results (41 passed,27 failed,1 existing exclusion), then its retry was canceled at the job deadline. All27 failure identities and44 original diagnostic attachments were retained. Representative actual images were entirely black—including the full-desktop screenshot—while AX still contained the expected grouped content and window geometry. Those captures cannot certify a layout regression or a new golden; the capture/app-responsiveness cause remains unproven. Generic Appium timeout wording is not proof of an infinite layout loop. No black golden or timeout/ignore workaround is included. The later fresh-worker native69-case recovery above does not establish a cause.

Badge colors are a real native rendering failure, not a safe golden refresh: source Home badgeBlue rendersRed on Catalyst, and an independent iPhone native bitmap rendersRed despite the correct Green native property getter. Per-item StandardAppearance was rejected because it colors every badge like the selected tab; global clearing, ordering and late-assignment probes also did not fix independent colors. All experiments and failing reproduction-only changes were removed. UIKit reports match this limitation (native report), but no safe supported per-item fix is certified. No Red golden, mask, tolerance relaxation or new ignore is published.

The Mac Picker31731 case still fails waiting for the root page in both complete attempts; its original native screenshot shows the picker popover still open. A precise focus/presentation/navigation cause has not been demonstrated. Windows Issue38059 horizontal-layout replacement also remains unresolved, and its incorrect expectation is not refreshed.

The earlier Windows Flyout RTL glyph-corruption receipt establishes prior inconsistent rendering, not the precise cause or the current-head result. Its golden is not refreshed. Expected and actual BackButtonHandled are bothFalse; an earlier True comparison was corrected. Windows CancelButtonColor passed on907a's predecessor; later exact f8 native evidence supports only the focused-label oracle correction described above, not a speculative color-production change.

Human-reviewed integration into protected net11.0 is still required before #39688 inherits corrections. No protected PR has been merged or approved.

Latest parent-only publication and current native UI receipts

Parent branch kubaflo-net11-promotion-compile-fixes is now normally pushed at 79eddf2b2d0dab4d4d7c4e5e26a2a2ee9856f2f5, containing f26 GC plus original cc6248 Windows focus production logic (8 lines) and its corrected three-variant native fixture (final74 lines). This adds only two new files/82 lines; no golden, SDK, shared-helper or tolerance changes. The original corrected fixture trees were located publicly in #39742 at ff8f3461055c922d3cf5ad504bbd8a6d88dad42b and ae09556e2a771a2a2a0c73292b6051a8b59c608f. Retained peer build1657386 receipts cover all three variants in both package modes, but are upstream-scope evidence, not new combined-head acceptance or CancelButtonColor certification. The earlier not-imported wording above describes the prior checkpoint; only the parent now contains the focus port. #39779 counterpart and linked checkout remain exactly cd, without this new port.

  • ./.dotnet/dotnet format Microsoft.Maui.sln --no-restore --include src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.Windows.cs --exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet — passed.
  • git diff --check — passed.
  • Historical combined 79 manual device1657568 Windows job 2bb3c12a-e73a-4044-b592-b131972acf99 was created at09:41:16, matching the exact Windows phase at09:39. Original Controls packaged and unpackaged Shell XMLs each completed77/77 passed,0 skips/failures. Exact ShellTests.SearchHandlerFocusTracksDetachment variants passed in both modes: removal/refocus0.8307094s packaged and0.8259344s unpackaged; replacement/refocus0.5663891s/0.5465569s; disconnect0.4454088s/0.6898395s. Receipts: parent files/79-native-windows-packaged-Shell.xml and files/79-native-windows-unpackaged-Shell.xml. This is combined-79 native acceptance for all six focus oracles after the ported production change—not merely upstream build1657386 evidence—but it is not current 691 head/native/all-three-pipeline acceptance and does not execute the new Uppercase assertion. Windows job-level Finished remains null: one packaged MauiBlazorWebView work item (a000OQ0) is still running with no files and console404, while the other nine apps plus the administrative item exited0. Other app XMLs have not been fully audited, so no10/10 certification, native hang/crash, or source-cause claim is made; cached Shell-glob search returning0 is not a measurement, while the authoritative49-file API listing supplied the original Shell XML links. Historical combined-79 CoreCLR retry dd84ab5e-00f0-4234-9b53-c07d5d6a5888 finished at10:20:53 with all five apps plus admin exit0, but its actual retry XML audit remains pending, so no full test counts are claimed. Catalyst Core OS26 remains unmeasured after the prior cancellation; no overall 79 gate pass is claimed.

Current cd Windows CV1 raw4584, publisher4586/run46141746, has initial355=332 passed+10 failed+13 existing skips. Nine setup failures recovered in the10-case targeted retry (9 passed/1 failed); final355=341 passed+13 existing skips+1 exact Issue38059_UntemplatedHorizontalGridLayout failure. All13 qualified goldens and Issue36422's post-screenshot assertion pass. The incorrect horizontal golden is not refreshed. Complete355-result JSON was retained by the parent.

Current Catalyst Shell1 raw4518, publisher4520/run46141376, has initial148=144 passed+4 same badge failures,0 skips; all four targeted retries fail. Complete148-result JSON and the existing iOS26.5 complete173-result JSON were retained. There is still no safe badge fix or badge-golden change. Main was29/31 jobs with remaining jobs running at the latest read, not a full-green measurement; overall main/UI remain running and current cd devices remain failed7/9 jobs. Parent-only/manual and upstream validation do not certify this counterpart.

Hosted parent-only GC after-acceptance

On manual f26 device1657552, Android Mono raw157 succeeded. Helix job a0a8fd7d-fdd6-45aa-a092-3312e36053be, Core work item on worker a000ADW, produced complete original native XML:3090=3018 passed+72 existing skips,0 failures/errors. The parent parsed original bytes and reconciled declared/actual counts; receipt files/f26-native-android-mono-core-results.xml. All nine AssertionExtensionsTests pass: exact earlier-reference True variant4.4212107s, False5.1103807s; retained-order False8.5293263s/True8.3305855s; all null/empty controls pass.

Before cd Core on worker a000ADL was3090=3017 passed+72 existing skips+1 True-variant failure4.999277s; after f26 on a000ADW is the complete native cohort above. This is hosted before/after cohort evidence, not an isolated native undo/revert control or full promotion certification. The parent completed the full native audit for source f26 manual device1657552, which completed succeeded9/9. Across62/62 logical app reports,154 canonical original XMLs declare46,202 tests=44,980 passed+1,222 existing skips+0 failures/errors, with every assembly-declared count reconciled. All71 individual work items—62 apps plus9 administrative items—finished with exit0; administrative items are excluded from test totals. Azure reports9/9 jobs complete and all11/11 individual Windows work items complete, while Windows job-level Finished metadata remains null/stale; this does not claim all nine job Finished fields. The five-app Android Mono cohort remains Core3090=3018 passed+72 skips, Controls1345=1332 passed+13 skips, Essentials424/424 passed, Graphics33/33 passed, and Blazor68=64 passed+4 skips. Actual new Windows packaged results are nonempty full-runtime XMLs: Controls1048=1015 passed+33 existing skips and Core2146=2035 passed+111 existing skips. The earlier PRETEST Appx missing-manifest condition did not recur in this f26 cohort; no source, cause, package, worker, or infrastructure-outage attribution is made. Receipts: parent files/f26-all-device-native-audit.json, files/f26-all-device-native-audit-originals/, and the earlier scoped XML receipts. This certifies only the older f26 GC native cohort—not current d673, combined 79 focus repair, or all-three-pipeline acceptance. Earlier8/9/Windows-running statements are historical superseded checkpoints.

Latest combined-parent CoreCLR failure and bounded retry

On 79 manual1657568, Android CoreCLR raw141, Helix 833b315d-8390-4238-a247-f3dfe3e63c0f, Controls worker a000ADY, produced complete native XML1345=1331 passed+13 existing skips+1 failure. Exact HybridWebViewTests_ContentRootResolution.RootedPath_DoesNotResolve(path: //content/page.html) failed in26.2155066s at the25000ms WaitForHybridWebViewLoaded before the path oracle. This is not evidence of a rooted-path security failure, a product source bug or an infrastructure outage. The parent audited all five actual app XMLs:4960=4870 passed+89 existing skips+1 failure; Core3090=3018 passed+72 existing skips, with all nine GC-class cases passing; Essentials424 passed; Graphics33 passed; Blazor68=64 passed+4 existing skips. Receipts: parent files/79-native-android-coreclr-*.xml.

The f26 CoreCLR comparison from raw149, Helix 0b63b622-3b9b-47bf-a4ae-f9cdbd260854, worker a000ADU, exercised the same unchanged Android Controls logic: complete1345=1332 passed+13 existing skips,0 failures; exact same //content/page.html case passed in0.452862s, as did all other rooted-path cases. Receipt: parent files/f26-native-android-coreclr-controls-results.xml. No wait, URL, SDK or source change was made.

One bounded CoreCLR stage retry was positively verified admitted as attempt2 for stage ref devicetests_android_coreclr, stage ID ed3a755a-04c9-545d-584b-d7b617cca329 (previous attempt1), with forceRetryAllJobs=false; recovery is pending. An initial GUID-as-stage-ref PATCH returned empty CLI output but did not admit an attempt according to the raw timeline; correcting the actual identifier admitted attempt2. This is one effective retry, not multiple admitted recoveries.

az devops invoke --org https://dev.azure.com/dnceng-public --area build --resource stages --route-parameters project=public buildId=1657568 stageRefName=devicetests_android_coreclr --http-method PATCH --api-version 7.1 --in-file /Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/retry-failed-helix-stage.json -o none — effective admission verified by actual stage attempt2; request body state=retry, forceRetryAllJobs=false. This is not native recovery, full combined-head acceptance, Windows focus acceptance or promotion certification. Historical pending statements above are checkpoints; this receipt updates only the combined-parent CoreCLR failure and admitted pending retry. Counterpart and checkout remain cd.

Issues Fixed

Refs #39688, #38765, #38234, #30381, and reused implementations #39746, #39761, #38445. This prerequisite does not auto-close an issue.

Dhivya-SF4094 and others added 11 commits October 26, 2026 20:22
Repair the merge integration errors blocking maui-pr, maui-pr-uitests and maui-pr-devicetests for #39688. Use the existing Paint parameter for the tab layout guard and qualify native WinUI badge values consistently with the other badge path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d595bf0b-ce58-4118-be08-7fe144955a64
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 30, 2026 18:10 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39779

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39779"

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 30, 2026 18:12 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 30, 2026 18:15 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 30, 2026 18:17 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 30, 2026 18:19 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 30, 2026 18:19 — with GitHub Actions Inactive
Extend the existing AppBarButton template Grid exception to badge removal as well as insertion. These controls are native WinUI Grid instances, not MauiPanel, so CachedChildren is unavailable. The same calls otherwise fail RS0030 after the merge type errors are corrected.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d595bf0b-ce58-4118-be08-7fe144955a64
@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

Reuse explicit NavigationRenderer registration for renderer-disposal continuations. Remove concrete ShellRenderer callback assumptions from three Android icon tests, reusing the native Shell fixture's toolbar lookup through a virtual hook. Preserve all assertions and exercise both real implementations.

Android native controls: fixed 79/79, original concrete callbacks 76/79 with the same three failures, restored 79/79. iPhone simulator disposal cases pass 2/2, revert to the same two InvalidCastException failures with original registration, and pass 2/2 after restoration. Four separate gesture cases remain pending the existing upstream #39746 implementation; no duplicate is included.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d595bf0b-ce58-4118-be08-7fe144955a64
@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A back-button callback can dispose the navigation manager, yet the code restores pending state and permits a native pop on the disconnected controller without rechecking disposal.

1 open issue
What changed in this PR

This PR prepares net11.0 for promotion in #39688 by correcting build blockers, platform behavior, and native test reliability.

Changes:

  • Fixes navigation, tab appearance, Windows search focus, and legacy CollectionView layout replacement.
  • Expands regression coverage and strengthens UI assertions, fixture isolation, and offline WebView testing.
  • Serializes shared restores, initializes writable CLI state, and improves retry-result handling and artifact paths.
File Description
src/​Core/​tests/​DeviceTests/​AssertionExtensionsTests.cs Stabilizes GC fixture lifetimes without changing collection helpers.
src/​Core/​src/​Platform/​iOS/​TabbedViewExtensions.cs Corrects the background variable used by the layout guard.
src/​Core/​src/​Platform/​iOS/​NavigationControllerManager/​NavigationControllerManager.cs Centralizes gesture admission and pending-pop tracking.
src/​Core/​src/​Platform/​iOS/​NavigationControllerManager/​INavigationManagerDelegate.cs Adds the interactive-pop policy contract.
src/​Core/​src/​Handlers/​NavigationPage/​NavigationViewHandler.iOS.cs Routes gesture admission through back-button handling.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue36422.cs Asserts that spacing changes preserve first-item visibility.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue30381.cs Asserts WebView history wait results.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​ShellSearchHandlerFeatureTests.cs Requires focused-state feedback before screenshots.
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​SafeArea_GridFeatureTests.cs Uses delayed constraints for safe-area polling.
src/​Controls/​tests/​TestCases.HostApp/​Resources/​Raw/​issue30381.html Adds an offline navigation destination.
src/​Controls/​tests/​TestCases.HostApp/​Issues/​Issue36422.cs Exposes item identities to UI automation.
src/​Controls/​tests/​TestCases.HostApp/​Issues/​Issue30381.cs Replaces external navigation with bundled HTML.
src/​Controls/​tests/​TestCases.HostApp/​FeatureMatrix/​EntryControl/​EntryControlPage.xaml.cs Clears editing focus before resetting options.
src/​Controls/​tests/​DeviceTests/​Elements/​TabbedPage/​TabbedPageTests.Android.cs Tests icon colors after tab rebuilding and selection.
src/​Controls/​tests/​DeviceTests/​Elements/​Shell/​ShellTests.Windows.cs Tests search focus across replacement, removal, and disconnect.
src/​Controls/​tests/​DeviceTests/​Elements/​Shell/​ShellTests.iOS.cs Covers back-policy admission, cancellation, and touch caching.
src/​Controls/​tests/​DeviceTests/​Elements/​Shell/​ShellTests.Android.cs Removes renderer-specific assumptions from icon tests.
src/​Controls/​tests/​DeviceTests/​Elements/​Shell/​ShellHandlerSubclasses.Android.cs Supplies native Shell toolbar lookup.
src/​Controls/​tests/​DeviceTests/​Elements/​NavigationPage/​NavigationPageTests.iOS.cs Extends gesture tests and fixes disposal-test registration.
src/​Controls/​tests/​DeviceTests/​Elements/​CollectionView/​CollectionViewTests.Windows.cs Tests legacy grid replacement and layout subscriptions.
src/​Controls/​src/​Core/​Toolbar/​Toolbar.Windows.cs Qualifies WinUI types and scopes native-grid analyzer exceptions.
src/​Controls/​src/​Core/​PublicAPI/​net-windows/​PublicAPI.Unshipped.txt Records the layout-update override.
src/​Controls/​src/​Core/​Platform/​Windows/​CollectionView/​FormsGridView.cs Detaches size-change handling from replaced panels.
src/​Controls/​src/​Core/​Platform/​Android/​TabbedViewManager.cs Reapplies icon colors after rebuilding bottom tabs.
src/​Controls/​src/​Core/​Handlers/​Shell/​ShellSectionHandler.iOS.cs Integrates shared gesture policy and guards duplicate pops.
src/​Controls/​src/​Core/​Handlers/​Shell/​ShellItemHandler.Windows.cs Clears detached search focus and synchronizes new ownership.
src/​Controls/​src/​Core/​Handlers/​Shell/​ShellItemHandler.Android.cs Refreshes the Material 3 indicator on appearance changes.
src/​Controls/​src/​Core/​Handlers/​Items/​StructuredItemsViewHandler.Windows.cs Reconfigures legacy grids when their layout is replaced.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​Shell/​iOS/​ShellSectionRenderer.cs Captures navigation-bar defaults before applying appearance.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​Shell/​iOS/​ShellNavBarAppearanceTracker.cs Extracts reusable navigation-bar default capture.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​Shell/​iOS/​ShellItemRenderer.cs Captures tab-bar defaults during initialization.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​Shell/​iOS/​SafeShellTabBarAppearanceTracker.cs Shares default capture while retaining lazy initialization.
eng/​pipelines/​common/​provision.yml Creates writable CLI state while preserving the package cache.
eng/​devices/​uitests-shared.cake Shortens unique diagnostic directory names.
eng/​devices/​uitest-retry.cake Recognizes preserved discovery-time ignores during recovery.
eng/​Build.props Serializes restores that share assets paths.
.github/​docs/​maui-ci-facts.md Documents CLI-state and package-cache provisioning.

Review effort: Balanced

Comment on lines +533 to +535
_shouldBegin ??= manager._delegate.ShouldBeginInteractivePop();
manager._interactivePopGesturePending = _shouldBegin.Value;
return manager._interactivePopGesturePending;

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Stamping as requested by @kubaflo; no code review performed.

@kubaflo
kubaflo merged commit 8afd640 into net11.0 Nov 1, 2026
143 of 176 checks passed
@kubaflo
kubaflo deleted the kubaflo-net11-compilation-prerequisite branch November 1, 2026 11:21
@github-actions github-actions Bot added this to the .NET 11.0-rc2 milestone Nov 1, 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 -->

Promotes the `net11.0` release line to `main` for the .NET 11 SR1
servicing cycle.

**Current publication status: CI repair remains in progress; this
promotion is not yet all-three-pipeline green or merge-ready.** The
original #39688 head remains `c13dddb0a6b5b57a31a7fed4d4779dc01b31a9ef`,
so the fixes are not in this PR yet. Active prerequisite
[#39779](#39779), targeting protected
`net11.0`, remains published at
`691808743d1b3915c9af359c9a37dae0588f51c2`; both owned correction refs
converge there, GitHub REST confirms that head, and the parent checkout
is clean. Exact-source
[device1657679](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657679)
completed succeeded all9/9 jobs with full native acceptance recorded
below. Exact-source
[maui-pr1657678](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657678)
has30/31 jobs passed with one running;
[UI1657680](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657680)
has113 passed,11 running, and3 failed jobs at the latest13:01UTC
receipt. The active `691-current-ci-watch5` observer source-checks
`691`. Azure `triggerInfo.pr.sourceSha` is `691`, while `92a13b…` is the
merge SHA, not the source head. #39688 inherits the fixes only after
#39779 passes required checks and is merged with explicit user
authorization. Protected `net11.0` and #39688 remain at `c13`; no
bypass, force-push, approval, or merge occurred.

**Current `691` device full native acceptance:** device1657679 has9/9
Helix jobs `Finished` and71/71 work items `Finished` with exit0. The
audit covers62 logical application reports; nine administrative items
are excluded. It retained164 original XML exports and154 canonical XMLs:
ten Windows aggregate duplicate exports are excluded, while intentional
OS/runtime/package/category repetitions remain. Every declaration
reconciles:46,208 actual tests=44,986 passed+1,222 measured actual
skips+0 failures/errors. This does not claim exact skip-identity
equivalence with historical f26 and no new skip source change was made.
Parent receipts: `files/691-all-device-native-audit.json`, all164
original XMLs under `files/691-all-device-native-audit-originals/`, and
size/SHA verification in
`files/691-native-originals-storage-receipt.json`; the earlier agent
memory-only artifact issue was fully recovered, leaving no
unretained-evidence boundary. Windows Shell completed77/77 passed in
each package mode; all six exact
`ShellTests.SearchHandlerFocusTracksDetachment` cases passed.
Packaged/unpackaged timings were removal0.8677749s/0.7552682s,
replacement0.5545906s/0.6443377s, and disconnect0.5587209s/0.4077961s.
The nine distinct GC cases across ten native runtime/platform reports
completed90 passes+0 nonpasses. Exact
`EarlierReferenceCollectedDuringLaterWait(useWaitForGC: True)` passed
in2.8526568s on Android Mono and4.3604772s on Android CoreCLR, verified
from original XML. Windows packaged Controls1051=1018 passed+33 skips,
Core2146=2035 passed+111 skips, and Blazor45=41 passed+4 skips;
unpackaged reports have the same counts, all nonempty real-runtime
results. Catalyst OS26 Core completed2486=2301 passed+185 skips+0
failures/errors, providing real execution unlike the historically
canceled combined-79 Core. This certifies the current device gate
only—not all-three pipelines or protected integration into original
#39688.

**Current `691` iOS Mono same-code recovery receipt:** device1657679
OS26 Mono General completed1292=1278 passed+14 existing skips+0
failures/errors, with all declarations reconciled. Exact
`MemoryTests_TabbedViewHandler.WindowDoesNotLeak("Window Does Not
Leak")` passed in0.2446597s on `dci-mac-build-475`; receipt: parent
`files/691-ios26-general-results.xml`. The current Window test, helper,
and40-GC behavior are unchanged from historical `d673`, where the same
case failed in1.1958577s, and from the passing f26/local cohorts. This
fresh same-code cohort recovery is not a root-cause fix, certified undo
experiment, product patch, or evidence for changing the fixture, helper,
GC count, wait budget, or skip.

**Current `691` Catalyst UI setup receipt:** UI1657680 Catalyst Shell1
task `bcc8dcd8-bcf8-5783-51a6-38f65fe366c5` / raw2612 failed before
tests while downloading the MSBuild logger ZIP from
`vstsagenttools.blob.core.windows.net`: DNS reported `nodename nor
servname provided, or not known`; telemetry to `dev.azure.com` also
recorded DNS failure. Both attempts produced no readable NUnit XML or
TRX, so the native Shell1 cases are **unmeasured**, not four badge-test
failures or evidence of a native product bug or global outage. The
Catalyst UI stage remains running and no stage2 retry has been admitted;
classification waits for stage completion and all failures. No network,
runtime, source, URI, timeout, budget, or configuration change is
claimed.

**Current `691` iOS badge visual-failure receipt:** UI1657680 iOS
CoreCLR latest Shell1 raw4524 and publisher4526 completed initial173=163
passed+6 existing skips+4 failures; the exact four-case targeted NUnit
retry completed4 failures+0 passes. Run46147754 reports result100169
`ShellBadgeCanBeCleared` at2.30%, result100170 `InitialBadgeIsVisible`
at2.31%, result100171 `SetAtRuntime` at2.31%, and result100172
`MultipleTabsCanHaveBadges` at2.31%; all four retained the same
percentage across both attempts and the publisher recorded four real
failures. Parent receipts: `files/691-ios-shell1-failed4524.log` and
`files/691-ios-shell1-publisher4526.log`. This is a current native iOS
badge visual mismatch, distinct from Catalyst Shell1's DNS pre-test
failure with no XML. No new expected colors, precise underlying
mechanism, golden change, mask, tolerance, or skip is claimed before
current-image inspection.

**Current `691` Windows CV1 receipt:** UI1657680
raw4534/publisher4536/run46147778 completed initial355=332 passed+13
existing skips+10 failures. The exact targeted retry completed10 cases=9
passed+1 failed, so final results are355=341 passed+13 existing skips+1
genuine `Issue38059_UntemplatedHorizontalGridLayout` failure. That case
remained4.91% different in both attempts; nine dynamic-fixture setup
cases recovered. The horizontal golden and source are unchanged in this
update, and no layout fix is claimed.

**Historical superseded `d673` native/UI receipt:** on device1657603 iOS
Mono raw141, OS26 General completed1292=1277 passed+14 existing skips+1
failure: `MemoryTests_TabbedViewHandler.WindowDoesNotLeak`, with the
Window alive at1.1958577s. The same exact OS26 case passed on `f26`
in0.1247654s. The source creates `ContentPage`, not `TabbedPage` (the
latter appears only through inherited registration), so no Tabbed
product root, infrastructure cause, isolated local red,
runtime/SDK/source fix, helper change,40-GC change, skip, or wait-budget
change is claimed. A fresh local original-fixture iOS Mono Core
simulator OS26.5 XML completed65=64 passed+1 existing skip, with the
exact Window case passing in0.2360164s; the wrapper exited1 only because
it expected `testResults.xml` while the verified fresh output was
`xunit-test-*.xml`. An initial build without the existing CI opt-in
stopped at NETSDK1242/no tests and is not red; the successful run used
the existing `UseMonoRuntime=true` and
`_DisableCheckForUnsupportedMonoMobileRuntime=true` settings from
`stage-device-tests.yml`. Current `691` native CI is rerunning the case.
Historical d673 main1657602 was canceled after the new-head push, after
only partial progress (seven base jobs while integration work was still
running); no all-green claim is made. The old observer exited on a
JSON-read error while fetching the canceled timeline, which is not a
test failure.

**Historical superseded `d673` Windows focus/color receipt:** Windows
Shell2 run46144002 completed197=183 passed+13 existing skips+1 failure.
Exact result100185 `CancelButtonColor` passed its strict `Focused`
precondition and unchanged new golden, providing native acceptance for
that focus/color case only. Sole failure result100195 `Uppercase` failed
both attempts visually at0.70%; actual attachment17 (`01e09879…`,22830
bytes) and AX (`3d424a28…`) prove `HasKeyboardFocus=True`,
`FocusStatus=Focused`, and exactly195 RGB changes in bbox
`(168,266)-(217,276)`, confined to the event label versus an empty-label
golden, with zero changes outside it—including all uppercase glyphs and
colors. The `691` update makes the strict `Focused.After(2000,100)`
assertion unconditional inside the existing Windows-only outer guard and
updates only those195 label pixels; it changes no scope, skip,
tolerance, mask, or uppercase visual requirement. The native PNG is
byte-identical to the captured actual. Managed WinUI test build passed
before publication with0 warnings/errors in23.75s and after publication
via `./.dotnet/dotnet build
src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj
-c Release --no-restore -v:q` with0 warnings/errors in18.26s; original
PNG byte comparison, scoped formatting, and `git diff --check` passed,
with three unrelated formatter whitespace changes restored. Actual
execution of the new `691` assertion remains pending fresh CI; this is
not full UI certification. Historical `d673` iOS Shell1
raw4295/publisher4310/run46144012 still has the same four badge failures
(173=163 passed+6 skips+4 failures; targeted retry4/4 failed), with no
safe badge fix or golden change.

**Historical superseded `cd` main-gate receipt:** maui-pr1657489
completed succeeded at `2026-10-31T09:39:23.6411636Z`. The fresh
complete Azure timeline contains1233 records and verifies31/31 jobs
succeeded, with no skipped or failed jobs. The run is qualified to exact
counterpart source `cd7a8cb8a21c8d798c9588da7ec86a3ae54379df`; the
original current-source Windows Pack raw267 records190 warnings/0
errors. This closed only the main gate on that historical PR-counterpart
head, **not all-three-pipeline promotion acceptance or current `691`
certification**. Earlier main-running/29-or30-of31 statements below are
preserved historical checkpoints superseded by this complete receipt and
the current publication status above. Historical `cd` devices failed7/9;
historical `cd` UI had genuine failures. Combined `79` manual1657568 and
`f26` manual1657552 remain historical scoped evidence, not current
certification.

#### Current-head device failures

Device1657491 Android Mono
[raw149](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657491/logs/149),
Helix job prefix `76c02089`, contains actual Core XML3090=3017 passed+72
existing skips+1 failure. Exact
`AssertionExtensionsTests.EarlierReferenceCollectedDuringLaterWait(useWaitForGC:
True)` failed in4.999277s with `System.Object` retained. The other four
actual app XML reports are Controls1345=1332 passed+13 existing skips,
Essentials424/424 passed, Graphics33/33 passed, and Blazor68=64 passed+4
existing skips. Parent receipt: `files/cd-device-android-mono-149.log`
plus native XML.

Windows
[raw165](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657491/logs/165),
Helix job prefix `5ded47b7`, records pre-test `Add-AppxPackage` failures
for Controls-packaged `a000OR5` and Core-packaged `a000ORS`:
`0x80073CF0`, missing `AppxManifest`/`0x80070003`, raw console
lines59-60. These work items have no XML: their native cases are
**unmeasured**, not product-test failures or proof of an infrastructure
outage. Parent receipt: `files/cd-device-windows-165.log`.

The parent independently matched and ported already-validated isolated
#39529 commit prefix `f11b88966`, identical fixture blob
`132ef9846b52df6bf59b7fb29c1317a5c24d31cc`: one fixture file,25 added/13
removed lines, with a stronger real-later-reference-alive assertion.
There are no helper,40-GC, case or runtime changes. After validation,
this port was committed as `f26c935851d398ea5cb4e4415fbe0c2f0fa6e4e4`
and normally pushed **only to parent branch
`kubaflo-net11-promotion-compile-fixes`**. The #39779 counterpart
remains exactly `cd` to preserve ongoing native UI receipts; it has not
inherited this port. Historical `f8` successes below remain separate.

#### Parent-only GC port and manual validation scope

Native full Core Android Mono AOT rebuild after the port passed in96.94s
with6 existing warnings/0 errors, producing native APK ABIs. The
existing runner temporarily injected only the exact-class module
initializer; no injection was committed. Three fresh native Mono AOT
ARM64/API34 processes each passed the same9/9 cases with0
failures/skips, including both regression variants and seven safety
cases; these are three processes, not27 distinct tests. A fourth
post-push process passed the same9/9. The old ARM64/API34 AOT fixture
also passed9/9 in one explicit-instrumentation process, so **no local
baseline-red or isolated local causality is claimed**. The actual
published `cd` x64 Mono True-variant CI failure above and original
#39529 causal controls support the port; ARM64 local preservation does
not certify x64 or current PR CI.

Exact commands/results supplied by the parent:

```sh
PATH="$PWD/.dotnet:$PATH" DOTNET_ROOT="$PWD/.dotnet" UseMonoRuntime=true _DisableCheckForUnsupportedMonoMobileRuntime=true pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Core -Platform android -IncludeClasses Microsoft.Maui.DeviceTests.AssertionExtensionsTests -TestFilter Category=Memory -DeviceUdid emulator-5554 -Rebuild -BuildOnly -OutputDirectory /Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/gc-upstream-fixed-build
```

Passed full native Core rebuild96.94s,6 existing warnings/0 errors, Mono
AOT/native APK. Baseline used the identical build command without
`-BuildOnly`, with output directory `files/cd-gc-baseline`: build
passed, but the default runtime invocation printed Android AM
help/exit82 and produced no XML/no tests. That invocation is not native
acceptance, a crash or causal red.

```sh
for repeat in 1 2 3; do
 ./.dotnet/dotnet /Users/kubaflo/.nuget/packages/microsoft.dotnet.xharness.cli/11.0.0-prerelease.26517.1/tools/net11.0/any/Microsoft.DotNet.XHarness.CLI.dll android test --app artifacts/bin/Core.DeviceTests/Release/net11.0-android/com.microsoft.maui.core.devicetests-Signed.apk --package-name com.microsoft.maui.core.devicetests --instrumentation com.microsoft.maui.core.devicetests.TestInstrumentation --device-id emulator-5554 --output-directory "/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/gc-fixed-$repeat" --timeout 00:05:00 --arg TestFilter=Category=Memory --arg "results-file-name=gc-fixed-$repeat.xml"
done
```

Each XHarness invocation exited0; each actual XML reports9/9 passed,0
failures/skips, exclusively the exact class. Post-push used the
identical single XHarness command without the loop, output directory
`files/gc-fixed-postpush` and `--arg
results-file-name=gc-fixed-postpush.xml`: exit0, actual XML9/9 passed.
The baseline explicit-instrumentation single command used
`files/cd-gc-baseline-explicit` and `--arg
results-file-name=cd-gc-baseline-explicit.xml`: old ARM64/API34 AOT
fixture9/9 passed, not local red.

- `./.dotnet/dotnet format Microsoft.Maui.sln --no-restore --include
src/Core/tests/DeviceTests/AssertionExtensionsTests.cs --exclude
Templates/src --exclude-diagnostics CA1822 --verbosity quiet` — passed.
- `git diff --check` — passed.
- `git hash-object
src/Core/tests/DeviceTests/AssertionExtensionsTests.cs` — returned
exactly `132ef9846b52df6bf59b7fb29c1317a5c24d31cc`, matching the
original upstream `f11` source blob.
- `az pipelines run --org https://dev.azure.com/dnceng-public --project
public --id 314 --branch
refs/heads/kubaflo-net11-promotion-compile-fixes` — admitted [manual
device1657552](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657552),
reason `manual`, exact
`sourceVersion=f26c935851d398ea5cb4e4415fbe0c2f0fa6e4e4`. Admission is
not a full native pass and is **not #39779 current CI**.

Only that fixture file was committed and parent-only pushed. Shared
helpers,40-GC behavior, cases, runtime, skips, production and APIs are
unchanged. Current `cd` device1657491 remains failed7/9 jobs; main/UI
remain running. No counterpart push or current-CI fix is claimed.

#### Latest correction and hosted evidence

The correction now includes `565`'s seven-line `eng/Build.props` change:
default `ProjectToBuild.RestoreInParallel=false` prevents
build-task-only and full restores from concurrently overwriting shared
assets evaluated for different target frameworks. Original `f8` Pack
Windows build1657400/raw log262/binlog prefix `8a3d7198` demonstrated
the `BuildTasksOnly` portable/full Package restore collision. Native
manual build1657433 Pack Windows/raw267 **succeeded with190 warnings/0
errors** on the `565` correction; after-binlog SHA
`133fbcbb3eac09bf0a97de3891791e5e2cbffcecd57d4c30bb322d5cff6294c5`,
ExecuteMSBuild task78, confirms `RestoreBuildInParallel=False`. Pack Mac
also succeeded. Local real restore passed in5.97s and post-push5.78s. No
pipeline tests or unproven stream-owner/source patches are included.
This scoped acceptance is not all-three-pipeline certification of `cd`.

**Current-head native packing acceptance:** on actual PR build1657489,
both Pack Windows and Pack macOS succeeded. The parent verified
`triggerInfo.pr.sourceSha=cd7a8cb8a21c8d798c9588da7ec86a3ae54379df`
using `az`. [Windows raw
log267](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657489/logs/267)
records `Build succeeded` at line2192,190 warnings at line2405 and0
errors at line2406, with packages published and `Finishing: Pack &
Publish`; receipt: parent `files/cd-native-windows-pack-267.log`. This
validates serialized restore on the actual current `cd` PR head, not
only the earlier isolated `565` manual run. Overall
main1657489/UI1657492 remain running and device1657491 completed
failed7/9 jobs; this is not an all-green claim. The new Windows
focused-state oracle now fails before the screenshot, as recorded below;
there is no native UI acceptance.

`cd7a8cb8a21` also updates only the Windows CancelButtonColor test and
its native expectation. All195 exact RGB differences between the old
expectation and native capture are confined to `FocusStatus`: old empty
text versus source-required `Focused`, with **zero differences outside
that label and an identical orange cancel-button rectangle**. Native AX
reports `HasKeyboardFocus=True`; the source Focused handler writes
`Focused`, and the test taps, clears and types `Testing`. A Windows-only
delayed assertion requires `Focused` before the screenshot (2s/100ms),
and only those195 label pixels are reconciled. Managed Windows UI-test
Release compilation passed with0 warnings/errors. The actual local old
comparer reported0.70%, whereas CI reported0.76%: these are **not
identical metrics**. The new expectation matches locally. No color,
comparison threshold, skip or CancelButtonColor production changes are
included.

**Current `cd` UI failure receipts:** Windows Shell2
[raw4404](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657492/logs/4404),
publisher4408/run46141148, exact result100193, fails the strict
`Focused` assertion with an empty label in both initial and retry
attempts **before the screenshot**. Complete197 results=183 passed+13
existing NotExecuted+1 failure; every other ShellSearch case passes,
including Uppercase. Fresh AX attachment3, prefix `caf50e45`,22176
bytes, shows Edit `AutomationId=TextBox`, `HasKeyboardFocus=True`, while
the `FocusStatus` TextBlock Name is empty. Thus there is no native
cancel-orange or new-golden acceptance: this is
focus-ownership/event-metadata divergence, not a visual-color fix. It
matches the peer `cc6248` line-owner-clear/new-focus-sync mechanism, but
that implementation is **not imported**; original corrected
native-fixture SHAs are awaited.

Latest iOS26.5 CoreCLR Shell1
[raw4463](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657492/logs/4463),
publisher4467/run46141232, has initial173 results=163 passed+6 existing
skips+4 same badge failures. All four failures were selected for
targeted retry; no retry acceptance is claimed. Unsupported badge probes
remain rejected, with no safe fix or badge-golden change. Overall
main/UI remain running and current `cd` devices remain failed7/9 jobs.

Latest exact commands/results from the parent session:

- `./build.sh -restore -ci -configuration Release -warnAsError false
/p:SkipInitInternalTooling=true /p:ValidateXcodeVersion=false
/bl:/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/restore-race-after.binlog`
— passed after `565`,0 warnings/0 errors,5.97s.
- `./build.sh -restore -ci -configuration Release -warnAsError false
/p:SkipInitInternalTooling=true /p:ValidateXcodeVersion=false
/bl:/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/restore-race-postpush.binlog`
— passed after publishing `565`,0 warnings/0 errors,5.78s.
- `./build.sh -restore -ci -configuration Release -warnAsError false
/p:SkipInitInternalTooling=true /p:ValidateXcodeVersion=false` — passed
after publishing `cd`,0 warnings/0 errors,7.83s.
- `./.dotnet/dotnet build
src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj
-c Release -v:q` — passed before `cd`,0 warnings/0 errors,37.17s.
- `./.dotnet/dotnet build
src/Controls/tests/TestCases.WinUI.Tests/Controls.TestCases.WinUI.Tests.csproj
-c Release -v:q --no-restore` — passed after publishing `cd`,0
warnings/0 errors,22.04s. This is managed NUnit test compilation, not
Windows UI runtime acceptance.
- `./.dotnet/dotnet format whitespace Microsoft.Maui.sln --no-restore
--include
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellSearchHandlerFeatureTests.cs
--verbosity quiet` — passed; three unrelated trailing-whitespace edits
were restored, leaving only five added C# lines.

Native `f8` device1657401 completed **all9/9 Helix jobs**:62 complete
XML reports,46,202 tests=44,980 passed+1,222 existing exclusions,0
failures/errors. Native Mac Entry raw4511/publisher4517/run46138420
completed121=118 passed+3 existing exclusions,0 failures; all four prior
failing targets passed. Native Mac CollectionView1
raw4182/publisher4185/run46137950 completed69=68 passed+1 existing
exclusion,0 failures on a fresh worker cohort. This recovers black
captures without establishing a cause or claiming a source black-capture
fix.

Windows CV1 raw4562/publisher4564/run46138612 completed355 final
results=341 passed+13 existing exclusions+1 real Horizontal Issue38059
failure; nine setup cases recovered. All13 updated expectations and
Issue36422's post-screenshot position assertion passed. The horizontal
capture still shows the wrong two vertical columns; its expectation is
not refreshed and no Windows handler patch is included. `f8` Shell2
Windows run46138102 failed CancelButtonColor at0.76% in both attempts
before the focused-label correction. `f8` iOS badge tests likewise
failed in both attempts with2.30%/2.31% differences. The native
source-required blue/green badge still renders red; the native API
limitation remains unresolved and unsafe probes were removed.

Initial `f8` main1657400 Pack failed as described above. Its Helix
Resizetizer `DebugColorizedWithNamed` had one DeleteTMP IO failure:
native796 results=793 passed+2 existing exclusions+1 failure. Debug
monitor303 resubmitted only the failed unchanged work item as
`6e8fd615-2895-4b7e-8c4c-cb58d1529722`; the monitor passed with0 failed
and uploaded339 logical results, **not a native result count**. The
parent has now verified native retry receipt
`files/f8-resizetizer-debug-retry-results.xml`:796=794 passed+2 existing
skips,0 failures/errors. Exact SVG test type
`Microsoft.Maui.Resizetizer.Tests.SkiaSharpSvgToolsTests+Resize`, method
`ColorizedWithNamedReturnsColored`, passed in0.3028857s; this is not the
same-named raster test. Source log303 confirms only one failed work item
was resubmitted with unchanged payload. This is historical `f8` native
recovery, not current `cd` CI certification. No speculative file-lock,
stream-owner, IO-lock source/infra attribution or Resizetizer source fix
is claimed. Fresh current `cd` main/UI remain running and device
completed failed; no current-head pass is claimed.

#### Earlier validation history (not current-head certification)

The preceding `f8f4e691aa9bdb689c24b2c2721d62ad6e157eb7` correction
repaired compilation and native-fixture routing, Android tab-icon tint,
strict UI retry recovery, SafeArea polling, scoped native11
expectations, the HTML history fixture's external-site dependency, and
Azure diagnostic-path length. That commit reconciled15 independently
reviewed native expectations and unfocused the Entry before resetting
fixture options. Its four related iPhone-simulator cases passed before
and after publication; the Catalyst app compiled. Native Mac acceptance
of the Entry candidate was pending at that checkpoint; the actual later
Entry run above now records acceptance.

On preceding `a5ac3382e87`, **maui-pr1657242 succeeded31/31**,
finishing2026-10-31T04:18:36UTC, and **maui-pr-devicetests1657251
succeeded9/9**, finishing04:11:27UTC. All62 actual native app/queue
reports were independently audited:46,202 tests=44,980 passed+1,222
existing exclusions,0 failures/errors. Two zero-selected Windows
FlexLayout reports are explicitly not passing measurements.
Source-pinned, unchanged-payload targeted retries recovered Android Mono
Essentials (exact424/424 x86), a Catalyst queue timeout where Core had
never executed, and a pre-test Windows MSIX deployment failure. No
speculative SDK/package/worker-cause fix is claimed.

Earlier correction907a also achieved **main1657009 succeeded31/31** and
**device1657010 succeeded with all nine source-log-correlated Helix jobs
complete and every work-item exit0**, including Windows Graphics
packaged/unpackaged. One Windows Release Resizetizer sharing violation
recovered through a targeted retry of only the failing work item with
unchanged payload; complete XML796=794 passed+2 original skips. No
unverified locking cause or speculative source fix is claimed.

The `f8f4e691aa9` validation runs were
[maui-pr1657400](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657400),
[device1657401](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657401),
and
[UI1657402](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1657402),
each admitted with the exact source SHA. Previous-head results are not
current-head certification or certification of this original promotion
source.

The correction retains original
[#39746](#39746) gesture commits and
[#39761](#39761) appearance-reset
implementation with direct-caller compatibility, preserving
ancestry/authorship. Combined native iPhone navigation/Shell/appearance
validation556/556 and post-push appearance16/16 pass; Android validation
includes143 native cases and four API30 UI cases. Existing
[#38445](#38445) Material3 callback
is wired into native Shell: API36 fixed2/2, callback-only revert1/2,
restored/post-push2/2. The bundled HTML history case passes, fails with
original history production behavior, passes after restoration, and
passes after publication. The Catalyst resource-path follow-up was
subsequently verified by actual hosted Mac WebView49/49, including
Issue30381 passed35s. These are scoped results, not cross-platform
certification.

At the earlier checkpoint UI still had genuine native Apple badge-color
failures, a Mac Picker return-to-root failure, Windows legacy
horizontal-layout replacement, and inconsistent Mac Entry editing-state
visuals. The final Mac CollectionView category on1657252 published69
initial results (41 passed,27 failed,1 existing exclusion) before its
retry was canceled at the job deadline. All27 failure identities and44
original diagnostic attachments were retained. Representative captures
were entirely black, including the full desktop, while AX still
contained grouped content and window geometry. These were not valid
golden updates or proof of a particular layout-loop cause. Later native
Entry and fresh-worker CollectionView results are recorded above; badge,
Picker and horizontal-layout repair are not certified.

Native badge getters can report the requested color while the bitmap
renders red; unsafe per-item/global workarounds and reproduction-only
changes were rejected and removed. No red-color baseline, tolerance
relaxation, mask or new skip is published. The incorrect Windows
Issue38059 horizontal-grid expectation and intermittent Mac Entry
goldens remain unchanged. Earlier Windows RTL corruption receipts
establish prior inconsistent rendering, not the current-head result or a
precise cause; its golden is not refreshed.

Real ordinary artifact publication for the bundled history follow-up
succeeded, but that is not proof that the longest407-to393-character
retry path was exercised. No such certification is claimed.

This PR's protected source remains
`e30e0542948ce84d5a574678e838e9a9aa2f26cd`; it inherits corrections only
after human-reviewed integration of #39779 into `net11.0`. No protected
PR has been merged or approved by this repair. Absent, partial and
older-head results are not passes.

Earlier prerequisite [#39713](#39713)
closed without merging and is not the active correction.
[#39673](#39673), which owned earlier
CV1 restorations, has merged. Native expectations are not certified by
borrowing cross-target oracles or weakening comparisons.

#### Latest parent-only publication and current native UI receipts

Parent branch `kubaflo-net11-promotion-compile-fixes` is now normally
pushed at `79eddf2b2d0dab4d4d7c4e5e26a2a2ee9856f2f5`, containing `f26`
GC plus original `cc6248` Windows focus production logic (8 lines) and
its corrected three-variant native fixture (final74 lines). This adds
only two new files/82 lines; no golden, SDK, shared-helper or tolerance
changes. The original corrected fixture trees were located publicly in
#39742 at `ff8f3461055c922d3cf5ad504bbd8a6d88dad42b` and
`ae09556e2a771a2a2a0c73292b6051a8b59c608f`. Retained peer build1657386
receipts cover all three variants in both package modes, but are
**upstream-scope evidence, not new combined-head acceptance or
CancelButtonColor certification**. The earlier not-imported wording
above describes the prior checkpoint; only the parent now contains the
focus port. #39779 counterpart and linked checkout remain exactly `cd`,
without this new port.

- `./.dotnet/dotnet format Microsoft.Maui.sln --no-restore --include
src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs
src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.Windows.cs
--exclude Templates/src --exclude-diagnostics CA1822 --verbosity quiet`
— passed.
- `git diff --check` — passed.
- Historical combined `79` manual device1657568 Windows job
`2bb3c12a-e73a-4044-b592-b131972acf99` was created at09:41:16, matching
the exact Windows phase at09:39. Original Controls packaged and
unpackaged Shell XMLs each completed77/77 passed,0 skips/failures. Exact
`ShellTests.SearchHandlerFocusTracksDetachment` variants passed in both
modes: removal/refocus0.8307094s packaged and0.8259344s unpackaged;
replacement/refocus0.5663891s/0.5465569s;
disconnect0.4454088s/0.6898395s. Receipts: parent
`files/79-native-windows-packaged-Shell.xml` and
`files/79-native-windows-unpackaged-Shell.xml`. This is combined-`79`
native acceptance for all six focus oracles after the ported production
change—not merely upstream build1657386 evidence—but it is not current
`691` head/native/all-three-pipeline acceptance and does not execute the
new Uppercase assertion. Windows job-level `Finished` remains null: one
packaged MauiBlazorWebView work item (`a000OQ0`) is still running with
no files and console404, while the other nine apps plus the
administrative item exited0. Other app XMLs have not been fully audited,
so no10/10 certification, native hang/crash, or source-cause claim is
made; cached Shell-glob search returning0 is not a measurement, while
the authoritative49-file API listing supplied the original Shell XML
links. Historical combined-`79` CoreCLR retry
`dd84ab5e-00f0-4234-9b53-c07d5d6a5888` finished at10:20:53 with all five
apps plus admin exit0, but its actual retry XML audit remains pending,
so no full test counts are claimed. Catalyst Core OS26 remains
unmeasured after the prior cancellation; no overall `79` gate pass is
claimed.

Current `cd` Windows CV1
[raw4584](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657492/logs/4584),
publisher4586/run46141746, has initial355=332 passed+10 failed+13
existing skips. Nine setup failures recovered in the10-case targeted
retry (9 passed/1 failed); final355=341 passed+13 existing skips+1 exact
`Issue38059_UntemplatedHorizontalGridLayout` failure. All13 qualified
goldens and Issue36422's post-screenshot assertion pass. The incorrect
horizontal golden is not refreshed. Complete355-result JSON was retained
by the parent.

Current Catalyst Shell1
[raw4518](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657492/logs/4518),
publisher4520/run46141376, has initial148=144 passed+4 same badge
failures,0 skips; all four targeted retries fail. Complete148-result
JSON and the existing iOS26.5 complete173-result JSON were retained.
There is still no safe badge fix or badge-golden change. Main was29/31
jobs with remaining jobs running at the latest read, not a full-green
measurement; overall main/UI remain running and current `cd` devices
remain failed7/9 jobs. Parent-only/manual and upstream validation do not
certify this counterpart.

#### Hosted parent-only GC after-acceptance

On manual `f26` device1657552, Android Mono
[raw157](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657552/logs/157)
succeeded. Helix job `a0a8fd7d-fdd6-45aa-a092-3312e36053be`, Core work
item on worker `a000ADW`, produced [complete original native
XML](https://helixr1107v0xdeko0k025g8.blob.core.windows.net/dotnet-maui-refs-heads-kubaflo-net11-promotioa0a8fd7dfdd645aaa0/com.microsoft.maui.core.devicetests-Signed/1/testResults.xml?helixlogtype=result):3090=3018
passed+72 existing skips,0 failures/errors. The parent parsed original
bytes and reconciled declared/actual counts; receipt
`files/f26-native-android-mono-core-results.xml`. All nine
`AssertionExtensionsTests` pass: exact earlier-reference True
variant4.4212107s, False5.1103807s; retained-order
False8.5293263s/True8.3305855s; all null/empty controls pass.

Before `cd` Core on worker `a000ADL` was3090=3017 passed+72 existing
skips+1 True-variant failure4.999277s; after `f26` on `a000ADW` is the
complete native cohort above. This is hosted before/after cohort
evidence, **not an isolated native undo/revert control or full promotion
certification**. The parent completed the full native audit for source
`f26` manual device1657552, which **completed succeeded9/9**.
Across62/62 logical app reports,154 canonical original XMLs
declare46,202 tests=44,980 passed+1,222 existing skips+0
failures/errors, with every assembly-declared count reconciled. All71
individual work items—62 apps plus9 administrative items—finished with
exit0; administrative items are excluded from test totals. Azure
reports9/9 jobs complete and all11/11 individual Windows work items
complete, while Windows job-level `Finished` metadata remains
null/stale; this does **not** claim all nine job `Finished` fields. The
five-app Android Mono cohort remains Core3090=3018 passed+72 skips,
Controls1345=1332 passed+13 skips, Essentials424/424 passed,
Graphics33/33 passed, and Blazor68=64 passed+4 skips. Actual new Windows
packaged results are nonempty full-runtime XMLs: Controls1048=1015
passed+33 existing skips and Core2146=2035 passed+111 existing skips.
The earlier PRETEST Appx missing-manifest condition did not recur in
this `f26` cohort; no source, cause, package, worker, or
infrastructure-outage attribution is made. Receipts: parent
`files/f26-all-device-native-audit.json`,
`files/f26-all-device-native-audit-originals/`, and the earlier scoped
XML receipts. This certifies only the older `f26` GC native cohort—not
current `d673`, combined `79` focus repair, or all-three-pipeline
acceptance. Earlier8/9/Windows-running statements are historical
superseded checkpoints.

#### Latest combined-parent CoreCLR failure and bounded retry

On `79` manual1657568, Android CoreCLR
[raw141](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657568/logs/141),
Helix `833b315d-8390-4238-a247-f3dfe3e63c0f`, Controls worker `a000ADY`,
produced complete native XML1345=1331 passed+13 existing skips+1
failure. Exact
`HybridWebViewTests_ContentRootResolution.RootedPath_DoesNotResolve(path:
//content/page.html)` failed in26.2155066s at the25000ms
`WaitForHybridWebViewLoaded` **before the path oracle**. This is not
evidence of a rooted-path security failure, a product source bug or an
infrastructure outage. The parent audited all five actual app
XMLs:4960=4870 passed+89 existing skips+1 failure; Core3090=3018
passed+72 existing skips, with all nine GC-class cases passing;
Essentials424 passed; Graphics33 passed; Blazor68=64 passed+4 existing
skips. Receipts: parent `files/79-native-android-coreclr-*.xml`.

The `f26` CoreCLR comparison from
[raw149](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1657552/logs/149),
Helix `0b63b622-3b9b-47bf-a4ae-f9cdbd260854`, worker `a000ADU`,
exercised the same unchanged Android Controls logic: complete1345=1332
passed+13 existing skips,0 failures; exact same `//content/page.html`
case passed in0.452862s, as did all other rooted-path cases. Receipt:
parent `files/f26-native-android-coreclr-controls-results.xml`. No wait,
URL, SDK or source change was made.

One bounded CoreCLR stage retry was positively verified admitted as
attempt2 for stage ref `devicetests_android_coreclr`, stage ID
`ed3a755a-04c9-545d-584b-d7b617cca329` (previous attempt1), with
`forceRetryAllJobs=false`; recovery is pending. An initial
GUID-as-stage-ref PATCH returned empty CLI output but did not admit an
attempt according to the raw timeline; correcting the actual identifier
admitted attempt2. This is one effective retry, not multiple admitted
recoveries.

`az devops invoke --org https://dev.azure.com/dnceng-public --area build
--resource stages --route-parameters project=public buildId=1657568
stageRefName=devicetests_android_coreclr --http-method PATCH
--api-version 7.1 --in-file
/Users/kubaflo/.copilot/session-state/d595bf0b-ce58-4118-be08-7fe144955a64/files/retry-failed-helix-stage.json
-o none` — effective admission verified by actual stage attempt2;
request body `state=retry`, `forceRetryAllJobs=false`. This is not
native recovery, full combined-head acceptance, Windows focus acceptance
or promotion certification. Historical pending statements above are
checkpoints; this receipt updates only the combined-parent CoreCLR
failure and admitted pending retry. Counterpart and checkout remain
`cd`.

### 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. -->

Refs #39688, #38765, #38234, #30381, and reused implementations #39746,
#39761, #38445. This prerequisite does not auto-close an issue.

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
kubaflo pushed a commit that referenced this pull request Nov 2, 2026
… in iOS 18.5 (#39827)

The resaved image was removed for iOS 18.5 and iOS 26.0 in the PR #39768
Later the image was resaved only for iOS 26.0 but not for iOS 18.5 in
the PR #39779
kubaflo pushed a commit that referenced this pull request Nov 3, 2026
…ndows (#39836)

Resaved the base images for **VerifyShellSearch_CancelButtonColor** and
**VerifyShellSearch_TextTransformUppercase** using the correct images
generated after the fix was included in PR #39779.
kubaflo added a commit that referenced this pull request Nov 3, 2026
…39787)

<!-- 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 -->

A narrow servicing **test-fixture fix** targeting `release/11.0.1xx`,
following #39742. Source `2c049b1fcd078270014484aadef62da0d1110fd4` has
the exact release commit `df9c5fd8109abf9411146d2fe041a2d8967e64ed` as
its direct parent; there are no promotion imports or dependency changes.

`Flyout_BackButtonPressed_Handled_True_Should_Stop_Navigation`
previously performed back immediately after an asynchronous Detail2
push, then started asynchronous cleanup before reading the root
handled-status label. The observed failure was a null reference at that
immediate root-label read, not an established product back-dispatch
failure.

Move the existing Detail2 readiness wait before the back action. Expose
the **same view model's actual event-derived `BackButtonHandled`** on
the current Detail2 page, only when `ShouldHandleBackButton` is true.
Assert the initial `False` value, then assert Detail2 is still displayed
and the actual status became `True`, before programmatic cleanup.
Missing status explicitly fails equality.

Only `FlyoutPageFeatureTests.cs` and `FlyoutControlPage.xaml.cs` change.
The callback, default False value, event/handled-false tests, existing
root labels, platform guards, case/category counts, waits, deadlines,
retries, and all PNG bytes remain unchanged. Ordinary Detail2 snapshot
scenarios do not receive the extra label.

**Native qualification — exact source, unchanged full/default
`maui-pr-uitests` definition 313:**

```sh
az pipelines run --id 313 --branch refs/heads/kubaflo-flyout-back-fixture --commit-id 2c049b1 --org https://dev.azure.com/dnceng-public --project public
```

No parameter or variable overrides were supplied. In [build
1658186](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1658186),
the complete relevant Android CoreCLR API30 batch passed **269/273 with
0 failures and 4 existing skips**; the complete native Windows batch
passed **216/225 with 0 failures and 9 existing skips**. All **21
Android and 13 Windows Flyout fixture cases passed**, including existing
screenshot assertions. Both complete case-name inventories match the
original published batches. Both relevant batches passed on their first
attempt; no retry occurred.

| Back case | Android run 46162268 | Windows run 46161974 |
|---|---|---|
| Event raised | [Passed, result
100134](https://dev.azure.com/dnceng-public/public/_apis/test/Runs/46162268/results/100134)
| [Passed, result
100062](https://dev.azure.com/dnceng-public/public/_apis/test/Runs/46161974/results/100062)
|
| Handled false permits navigation | [Passed, result
100072](https://dev.azure.com/dnceng-public/public/_apis/test/Runs/46162268/results/100072)
| [Passed, result
100196](https://dev.azure.com/dnceng-public/public/_apis/test/Runs/46161974/results/100196)
|
| Handled true stops navigation | [Passed, result
100212](https://dev.azure.com/dnceng-public/public/_apis/test/Runs/46162268/results/100212)
| [Passed, result
100141](https://dev.azure.com/dnceng-public/public/_apis/test/Runs/46161974/results/100141)
|

Raw native logs 5466 (Android) and 5143 (Windows), full paginated
results, and both downloaded TRXs were inspected. Local pinned
SDK11.0.100 / Android37.2.29 CoreCLR qualification also passed all 21
existing Android Flyout cases on an owned API30 emulator; both managed
clients and the Android HostApp compiled successfully. No physical Apple
or local macOS XCTest automation was used.

The broader default pipeline is still running and has other batches in
failed/running states. This is qualification of the narrow Flyout
fixture, **not a claim that all CI is green**. The original source
passed this back case first and failed it on retry, so these results are
not represented as a deterministic baseline-red/fix-green/revert-red
causal certification.

Upstream recheck found no duplicate back-fixture implementation: #39779
currently changes no Flyout files; #38822 touches this test file only
for unrelated RTL/title setup changes.

### 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. -->

Follow-up to #39742: corrects the newly observed Flyout handled-true
fixture race in [build
1658120](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1658120),
Android retry run 46159644 / result 100203 (`NullReferenceException`,
4853 ms, old test line 512). Original first/retry logs, failure
accessibility bytes, and native TRXs are preserved with verified SHA256
hashes. The two separate Bugzilla55912 first-attempt failures were
initial GridLabel/StackLabel waits before any tap and are not modified
by this PR.

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1b5d83ad-4b4b-4107-9a42-c1ada4de4e38
kubaflo added a commit that referenced this pull request Nov 3, 2026
…39791)

<!-- 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 -->

This is an explicitly requested **servicing backport**, targeting
`release/11.0.1xx`, not a new alternative fix or a promotion merge.
Commit `36bfdc9cc4dcdd4bbc3cac35110595a93b7634ba` has the exact
servicing parent `df9c5fd8109abf9411146d2fe041a2d8967e64ed` from #39742.

Retain the existing owned fixture correction from #39779:
- Only `TestCases.HostApp/Issues/Issue30381.cs`,
`TestCases.HostApp/Resources/Raw/issue30381.html`, and
`TestCases.Shared.Tests/Tests/Issues/Issue30381.cs` from source commit
`7d49f3b58650e187f06ce29f80d2a1744c6aef23`; **do not import that
commit's unrelated `eng/devices/uitests-shared.cake` edit**.
- Retain the isolated HostApp-only Catalyst bundle correction from
`a5ac3382e878da00bec8ac59bc56cd196122f5d2`. The resulting three files
are byte-identical to those retained owner blobs; original authorship
and source/session provenance are recorded in the commit.

Replace the external GitHub destination with a five-line bundled
document, match the completed destination URL, and strictly assert all
five existing boolean wait results. Catalyst changes only the anchor
href to `Contents/Resources/issue30381.html`, matching its actual
bundled raw-asset location.

**Preserved:** the initial `HtmlWebViewSource` and null `BaseUrl`,
JavaScript link click, original 1-second sleep, every navigation/status
action and final assertion, existing Android/Windows compile guards,
categories, case definitions, goldens, waits, and budgets. No
dependency, promotion, runner, pipeline, project, or other follow-up
changes. Exactly **3 files, +22/−11**.

#### Supported-target qualification

The unchanged full/default `maui-pr-uitests` definition 313 branch run
[1658190](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1658190)
used the exact pushed source, without parameter, variable, category,
matrix, configuration, or budget overrides. Each native lane's own
checkout log confirms `36bfdc9cc4dcdd4bbc3cac35110595a93b7634ba`.

`Issue30381.WebViewCanGoForwardShouldHaveValueAfterNavigation` passed on
the **first execution** in all three applicable default native lanes. No
test/task retry was executed in these WebView lanes.

| Actual target | Full WebView catalog | Issue30381 | Own receipt |
|---|---|---|---|
| MacCatalyst, CoreCLR on macOS **14.8.7** (`macos-14` image
`20260629.0276.1`) | **47/47 Passed** | Passed **32.420s** | [Native run
46161964](https://dev.azure.com/dnceng-public/public/_TestManagement/Runs?runId=46161964&_a=runCharts),
result 100039; raw log 4745, publication 4752 |
| iPhone 11 Pro CoreSimulator, actual **iOS 26.5** (`latest` lane),
CoreCLR | **53: 52 Passed, 1 existing NotExecuted** | Passed **6.453s**
| [Native run
46162166](https://dev.azure.com/dnceng-public/public/_TestManagement/Runs?runId=46162166&_a=runCharts),
result 100003; raw log 5067, publication 5081 |
| iPhone 11 Pro CoreSimulator, actual **iOS 18.5**, CoreCLR | **53: 52
Passed, 1 existing NotExecuted** | Passed **6.360s** | [Native run
46162092](https://dev.azure.com/dnceng-public/public/_TestManagement/Runs?runId=46162092&_a=runCharts),
result 100041; raw log 4956, publication 4991 |

The complete native catalogs and raw first-run case names match the
servicing baselines exactly: **Mac 47, iOS 53**, not both 47 and not the
owner's separate 49-case promotion catalog. The existing iOS
`Issue1583_1_WebviewTest` NotExecuted result remains explicit; this PR
adds no skips and does not claim every unrelated existing test executed.

The current servicing failure evidence was build 1658120/source
`19f886dbca0dadd7bd70141fe5859a04b48ff7b8`: Catalyst raw log 4626 showed
the same 47-case catalog failing **46 Passed/1 Failed** on both first
execution and the stock retry, at `App.Tap("UpdateStatusButton")`, test
line 28, after external navigation, with a **45s Appium RPC timeout**.
Publication 4628/native run 46160090 agreed. Those fixture/runner paths
are unchanged between that source and this backport's servicing parent.
The separately bounded 15s diagnostic timeout is not an increased test
budget. Earlier passing runs and the owner's receipts are not
substituted for this backport's own native acceptance; no Catalyst
ablation certification is claimed.

Both actual compiled app members in this build's
`ui-tests-samples-coreclr` artifact 50872337 were downloaded and
verified against the tracked asset: iOS `.app/issue30381.html` and
Catalyst `.app/Contents/Resources/issue30381.html`, each **130 bytes**,
SHA-256
`140056173bca657a3b6ccde00de0b4a1fb0b07ea419856ad7be61352784d728d`.
Existing `MauiAsset` wildcard packaging is unchanged.

#### Commands and local limits

Exact branch qualification command — successfully queued run 1658190;
native WebView results are above, **overall run failed** for the
residuals below:

```sh
az pipelines run --id 313 --branch refs/heads/kubaflo-webview-history-fixture-servicing --commit-id 36bfdc9 --org https://dev.azure.com/dnceng-public --project public --only-show-errors -o json
```

Exact managed-only compile commands — both **passed, 0 warnings/0
errors**, using the already verified SDK 11.0.100/a586537b38:

```sh
env -u DOTNET_ROOT /Users/kubaflo/Projects/copilot-worktrees/maui/kubaflo-potential-tribble/.dotnet/dotnet build src/Controls/tests/TestCases.Mac.Tests/Controls.TestCases.Mac.Tests.csproj -c Release -f net11.0 -p:MauiPlatforms=net11.0 -v minimal
env -u DOTNET_ROOT /Users/kubaflo/Projects/copilot-worktrees/maui/kubaflo-potential-tribble/.dotnet/dotnet build src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj -c Release -f net11.0 -p:MauiPlatforms=net11.0 -v minimal
```

The exact HostApp fixture also compiled against real managed MAUI
assemblies with and without `MACCATALYST`, each 0 warnings/0 errors.
These local checks are **not native HostApp certification**. The SDK has
no installed workloads; the required Apple SDK 27 toolchain is
unavailable locally. No toolchain downgrade/bypass, physical Apple
device, or local host-macOS XCTest execution was used. Native acceptance
comes only from the actual CI receipts above.

#### Remaining CI failures — not fixed or hidden here

Run 1658190 completed **Failed** at `2026-11-01T05:04:35Z`; this is
**not an overall green-CI or merge-ready claim**. All final
non-successful jobs were inspected separately:
- **Windows Shell2:** raw 6040/native run 46166972; first and stock
retry each **197: 181 Passed, 3 Failed, 13 NotExecuted**.
`VerifyShellSearch_CancelButtonColor` and
`VerifyShellSearch_CharacterSpacing` retain 0.76% visual differences;
`VerifyShellSearch_TextTransformUppercase` retains 0.70%. Those separate
oracles/snapshots are the subject of owned follow-up #39783 and are
untouched here.
- **MacCatalyst Layout:** raw 6061/native run 46170266; the complete
first run was **193: 188 Passed, 1 Failed, 4 NotExecuted**, failing
`Issue17389.ValidateBackgroundColorDoesNotAffectInputTransparent`
because RedGrid tap count remained false. The unchanged full 193-case
stock retry was canceled at the existing **180-minute job limit**, with
no completed retry summary. Publication 6063 retained the actual
first-run failure; missing retry completion is not treated as a pass.
Layout execution is a separate follow-up (#39786); neither that runner
nor Issue17389 is changed here.

Open/recent merged upstream and servicing fixture history were rechecked
before publication; there is no servicing duplicate of this three-file
correction. No fresh CI retry was queued to force green, no unrelated
follow-up was imported, and no merge is requested by this qualification
report.

### 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 the supported-target **Issue30381 UI fixture timeout/ignored
readiness assertions** observed in servicing CI. Related to #30381; its
original product history fix is already present from #33183. This is a
fixture backport, not a new product fix or a reproduction-only PR.

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
kubaflo added a commit that referenced this pull request Nov 4, 2026
### Issue details
On iOS and Mac Catalyst, Shell badges render using the system's default
red color instead of their configured blue, red, or orange colors. This
affects the following UI tests:

- ShellBadgeMultipleTabsCanHaveBadges
- ShellBadgeCanBeSetAtRuntime
- ShellBadgeCanBeCleared
- ShellBadgeInitialBadgeIsVisible

**Regression PR:** #39779

### Root cause
[PR-39779](#39779) captures tab bar
defaults earlier during initialization. However, ResetAppearance uses
the fact that defaults have been captured as the condition for restoring
them.
As a result, an unstyled Shell now explicitly applies native default
appearances where it previously did nothing, causing badges to use the
system's default red color.

### Description of changes

- Track whether Shell has applied a custom tab-bar appearance.
- Skip resetting the tab bar during initial setup when Shell styling has
not been applied.
- Restore the captured native appearance when Shell styling is cleared.
- Reapply per-tab badge values after setting or resetting the tab-bar
appearance.

### Screenshot

| Before Issue Fix | After Issue Fix |
|----------|----------|
| <img width="562" height="1100"
src="https://github.com/user-attachments/assets/673c60af-387a-4d76-a214-7e7cb4924ff3">
| <img width="562" height="1100"
src="https://github.com/user-attachments/assets/25fdecba-13bf-470e-bbba-f2f1e4481c82">
|

Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Nov 4, 2026
…lGridLayout cv1 (#39875)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Issue and Description of Change
Issue38059_UntemplatedHorizontalGridLayout reflects the current CV1
behavior. Dynamic layout changes previously did not work in CV1 and were
fixed in #39779. With that fix, the layout now updates, but the columns
appear clipped. The current CI screenshot captures this existing CV1
behavior.

I created an issue to track this behavior and excluded the test from the
Windows CV1 lane. Additionally, I added helper methods to selectively
skip tests in the Windows CV1 and CV2 configurations.

### Issues Fixed
Test Failure Issue38059_UntemplatedHorizontalGridLayout on Windows cv1
kubaflo added a commit that referenced this pull request Nov 18, 2026
…path (APT2260) (#40406)

<!-- 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Build infrastructure only; no product or test code changes.

**Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail
intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0`
`Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other
Material attributes. Recent examples are net11 maui-pr
[1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582)
and candidate maui-pr
[1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577).
There have been 6 Pack and 2 Build Windows failures since 15 Nov, across
branches.

**Root cause.** `eng/Build.props` restores
`Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first,
then the full solution filter, in the same MSBuild process:
1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in
`Directory.Build.props`. The first restore therefore writes a reduced
`artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with
import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`.
2. The full restore's evaluations parse those same files into the
in-process `ProjectRootElementCache`, then rewrite them with all TFMs.
3. That cache does not revalidate timestamps: it is created with
`autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the
rest weakly. Later build evaluations can reuse the stale reduced XML, so
platform TFMs lose their `buildTransitive` package imports, including
the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether
the stale entry survives depends on cache eviction and GC, which is why
the failure is intermittent.

CI binlogs show this directly. In failing build 1688582, the build-phase
evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core`
(ios/windows) and `Graphics` (android/windows) have zero package imports
from the `nuget.g.targets`. Passing net11 build
[1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936)
has the normal import counts. #39779 serialized the two restores
(`RestoreInParallel=false`) but they still shared these generated files.
#40206 worked around the same mechanism for `Controls.Core` with
explicit package references.

**Fix.** For the build-task restore only, `Directory.Build.props` sets
`MSBuildProjectExtensionsPath` to
`$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes
`nuget.g.*`, `project.assets.json` and dgspec files under
`artifacts/obj/<project>/buildtasks/`. The full restore and build keep
the default `artifacts/obj/<project>/` path, and the full restore's
evaluations never read the reduced files. Arcade's `ProjectLayout.props`
sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props`
defaults `MSBuildProjectExtensionsPath` after importing
`Directory.Build.props`, so this is the supported place to set it.
Nothing in the repo reads these paths directly. Other
`BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`,
`eng/pipelines/arcade/setup-test-env.yml`) restore before every later
build, so they also stop overwriting the full assets. The comment in
`eng/Build.props` is updated to match.

Rejected alternatives:
- `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change.
- More explicit package references, as in #40206: a per-project
workaround that doesn't remove the shared state.
- Disabling project-extension imports: unsafe.

### Validation

All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`.

**Minimal standalone repro.** A local package with `build/net10.0`
targets, consumed by a library whose TFMs shrink from `net11.0;net10.0`
to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the
reduced restore, then the full restore, then reads the package marker
for `net10.0`:

| Run | Result |
| --- | --- |
| Baseline | marker missing (red) |
| Fix | marker present (green) |
| Fix reverted | marker missing (red) |
| Fix restored | marker present (green) |
| Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present
(green): the in-proc XML cache is the mechanism |

**Repo-level repro, in Arcade's order.** The driver runs a
`BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full
`Controls.Xaml` restore, then an evaluation of `Controls.Xaml`
`net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs
used `CI=true -p:IncludeMacOSTargetFrameworks=false`.
`MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction,
which makes the CI intermittency deterministic:

| Run | AndroidAarLibrary (all / Material) | Package imports in the
build-phase android evaluation |
| --- | --- | --- |
| Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` |
| Fix | 69 / 1 (green) | 133 |
| Fix reverted | 0 / 0 (red) | — |
| Fix restored | 69 / 1 (green) | — |

With default cache settings the baseline was green locally (69/1), which
is consistent with the eviction-dependent intermittency seen in CI.

**Other checks.**
- Evaluation with `BuildTaskOnlyBuild=true`:
`MSBuildProjectExtensionsPath`, `RestoreOutputPath` and
`ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`.
Without it they stay at `artifacts/obj/Controls.Xaml/`.
- `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug
-p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build
succeeded, 0 warnings. All 12 restored projects wrote their assets under
`artifacts/obj/<project>/buildtasks/`.

The CI proof will be a Pack run's Windows binlog: the full restore's
evaluations should no longer import a normal-path `nuget.g.targets`
written by the build-task restore.

### Issues Fixed

Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue
is filed; this was found while triaging #40116 CI.

Fixes #

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SubhikshaSf4851 pushed a commit to SubhikshaSf4851/maui that referenced this pull request Nov 23, 2026
…path (APT2260) (dotnet#40406)

<!-- 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Build infrastructure only; no product or test code changes.

**Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail
intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0`
`Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other
Material attributes. Recent examples are net11 maui-pr
[1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582)
and candidate maui-pr
[1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577).
There have been 6 Pack and 2 Build Windows failures since 15 Nov, across
branches.

**Root cause.** `eng/Build.props` restores
`Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first,
then the full solution filter, in the same MSBuild process:
1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in
`Directory.Build.props`. The first restore therefore writes a reduced
`artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with
import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`.
2. The full restore's evaluations parse those same files into the
in-process `ProjectRootElementCache`, then rewrite them with all TFMs.
3. That cache does not revalidate timestamps: it is created with
`autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the
rest weakly. Later build evaluations can reuse the stale reduced XML, so
platform TFMs lose their `buildTransitive` package imports, including
the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether
the stale entry survives depends on cache eviction and GC, which is why
the failure is intermittent.

CI binlogs show this directly. In failing build 1688582, the build-phase
evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core`
(ios/windows) and `Graphics` (android/windows) have zero package imports
from the `nuget.g.targets`. Passing net11 build
[1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936)
has the normal import counts. dotnet#39779 serialized the two restores
(`RestoreInParallel=false`) but they still shared these generated files.
dotnet#40206 worked around the same mechanism for `Controls.Core` with
explicit package references.

**Fix.** For the build-task restore only, `Directory.Build.props` sets
`MSBuildProjectExtensionsPath` to
`$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes
`nuget.g.*`, `project.assets.json` and dgspec files under
`artifacts/obj/<project>/buildtasks/`. The full restore and build keep
the default `artifacts/obj/<project>/` path, and the full restore's
evaluations never read the reduced files. Arcade's `ProjectLayout.props`
sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props`
defaults `MSBuildProjectExtensionsPath` after importing
`Directory.Build.props`, so this is the supported place to set it.
Nothing in the repo reads these paths directly. Other
`BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`,
`eng/pipelines/arcade/setup-test-env.yml`) restore before every later
build, so they also stop overwriting the full assets. The comment in
`eng/Build.props` is updated to match.

Rejected alternatives:
- `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change.
- More explicit package references, as in dotnet#40206: a per-project
workaround that doesn't remove the shared state.
- Disabling project-extension imports: unsafe.

### Validation

All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`.

**Minimal standalone repro.** A local package with `build/net10.0`
targets, consumed by a library whose TFMs shrink from `net11.0;net10.0`
to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the
reduced restore, then the full restore, then reads the package marker
for `net10.0`:

| Run | Result |
| --- | --- |
| Baseline | marker missing (red) |
| Fix | marker present (green) |
| Fix reverted | marker missing (red) |
| Fix restored | marker present (green) |
| Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present
(green): the in-proc XML cache is the mechanism |

**Repo-level repro, in Arcade's order.** The driver runs a
`BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full
`Controls.Xaml` restore, then an evaluation of `Controls.Xaml`
`net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs
used `CI=true -p:IncludeMacOSTargetFrameworks=false`.
`MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction,
which makes the CI intermittency deterministic:

| Run | AndroidAarLibrary (all / Material) | Package imports in the
build-phase android evaluation |
| --- | --- | --- |
| Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` |
| Fix | 69 / 1 (green) | 133 |
| Fix reverted | 0 / 0 (red) | — |
| Fix restored | 69 / 1 (green) | — |

With default cache settings the baseline was green locally (69/1), which
is consistent with the eviction-dependent intermittency seen in CI.

**Other checks.**
- Evaluation with `BuildTaskOnlyBuild=true`:
`MSBuildProjectExtensionsPath`, `RestoreOutputPath` and
`ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`.
Without it they stay at `artifacts/obj/Controls.Xaml/`.
- `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug
-p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build
succeeded, 0 warnings. All 12 restored projects wrote their assets under
`artifacts/obj/<project>/buildtasks/`.

The CI proof will be a Pack run's Windows binlog: the full restore's
evaluations should no longer import a normal-path `nuget.g.targets`
written by the build-task restore.

### Issues Fixed

Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue
is filed; this was found while triaging dotnet#40116 CI.

Fixes #

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit to kubaflo/maui that referenced this pull request Nov 23, 2026
…path (APT2260) (dotnet#40406)

<!-- 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Build infrastructure only; no product or test code changes.

**Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail
intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0`
`Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other
Material attributes. Recent examples are net11 maui-pr
[1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582)
and candidate maui-pr
[1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577).
There have been 6 Pack and 2 Build Windows failures since 15 Nov, across
branches.

**Root cause.** `eng/Build.props` restores
`Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first,
then the full solution filter, in the same MSBuild process:
1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in
`Directory.Build.props`. The first restore therefore writes a reduced
`artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with
import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`.
2. The full restore's evaluations parse those same files into the
in-process `ProjectRootElementCache`, then rewrite them with all TFMs.
3. That cache does not revalidate timestamps: it is created with
`autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the
rest weakly. Later build evaluations can reuse the stale reduced XML, so
platform TFMs lose their `buildTransitive` package imports, including
the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether
the stale entry survives depends on cache eviction and GC, which is why
the failure is intermittent.

CI binlogs show this directly. In failing build 1688582, the build-phase
evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core`
(ios/windows) and `Graphics` (android/windows) have zero package imports
from the `nuget.g.targets`. Passing net11 build
[1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936)
has the normal import counts. dotnet#39779 serialized the two restores
(`RestoreInParallel=false`) but they still shared these generated files.
dotnet#40206 worked around the same mechanism for `Controls.Core` with
explicit package references.

**Fix.** For the build-task restore only, `Directory.Build.props` sets
`MSBuildProjectExtensionsPath` to
`$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes
`nuget.g.*`, `project.assets.json` and dgspec files under
`artifacts/obj/<project>/buildtasks/`. The full restore and build keep
the default `artifacts/obj/<project>/` path, and the full restore's
evaluations never read the reduced files. Arcade's `ProjectLayout.props`
sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props`
defaults `MSBuildProjectExtensionsPath` after importing
`Directory.Build.props`, so this is the supported place to set it.
Nothing in the repo reads these paths directly. Other
`BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`,
`eng/pipelines/arcade/setup-test-env.yml`) restore before every later
build, so they also stop overwriting the full assets. The comment in
`eng/Build.props` is updated to match.

Rejected alternatives:
- `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change.
- More explicit package references, as in dotnet#40206: a per-project
workaround that doesn't remove the shared state.
- Disabling project-extension imports: unsafe.

### Validation

All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`.

**Minimal standalone repro.** A local package with `build/net10.0`
targets, consumed by a library whose TFMs shrink from `net11.0;net10.0`
to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the
reduced restore, then the full restore, then reads the package marker
for `net10.0`:

| Run | Result |
| --- | --- |
| Baseline | marker missing (red) |
| Fix | marker present (green) |
| Fix reverted | marker missing (red) |
| Fix restored | marker present (green) |
| Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present
(green): the in-proc XML cache is the mechanism |

**Repo-level repro, in Arcade's order.** The driver runs a
`BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full
`Controls.Xaml` restore, then an evaluation of `Controls.Xaml`
`net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs
used `CI=true -p:IncludeMacOSTargetFrameworks=false`.
`MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction,
which makes the CI intermittency deterministic:

| Run | AndroidAarLibrary (all / Material) | Package imports in the
build-phase android evaluation |
| --- | --- | --- |
| Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` |
| Fix | 69 / 1 (green) | 133 |
| Fix reverted | 0 / 0 (red) | — |
| Fix restored | 69 / 1 (green) | — |

With default cache settings the baseline was green locally (69/1), which
is consistent with the eviction-dependent intermittency seen in CI.

**Other checks.**
- Evaluation with `BuildTaskOnlyBuild=true`:
`MSBuildProjectExtensionsPath`, `RestoreOutputPath` and
`ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`.
Without it they stay at `artifacts/obj/Controls.Xaml/`.
- `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug
-p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build
succeeded, 0 warnings. All 12 restored projects wrote their assets under
`artifacts/obj/<project>/buildtasks/`.

The CI proof will be a Pack run's Windows binlog: the full restore's
evaluations should no longer import a normal-path `nuget.g.targets`
written by the build-task restore.

### Issues Fixed

Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue
is filed; this was found while triaging dotnet#40116 CI.

Fixes #

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SuthiYuvaraj pushed a commit to SuthiYuvaraj/maui that referenced this pull request Nov 25, 2026
…path (APT2260) (dotnet#40406)

<!-- 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Build infrastructure only; no product or test code changes.

**Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail
intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0`
`Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other
Material attributes. Recent examples are net11 maui-pr
[1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582)
and candidate maui-pr
[1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577).
There have been 6 Pack and 2 Build Windows failures since 15 Nov, across
branches.

**Root cause.** `eng/Build.props` restores
`Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first,
then the full solution filter, in the same MSBuild process:
1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in
`Directory.Build.props`. The first restore therefore writes a reduced
`artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with
import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`.
2. The full restore's evaluations parse those same files into the
in-process `ProjectRootElementCache`, then rewrite them with all TFMs.
3. That cache does not revalidate timestamps: it is created with
`autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the
rest weakly. Later build evaluations can reuse the stale reduced XML, so
platform TFMs lose their `buildTransitive` package imports, including
the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether
the stale entry survives depends on cache eviction and GC, which is why
the failure is intermittent.

CI binlogs show this directly. In failing build 1688582, the build-phase
evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core`
(ios/windows) and `Graphics` (android/windows) have zero package imports
from the `nuget.g.targets`. Passing net11 build
[1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936)
has the normal import counts. dotnet#39779 serialized the two restores
(`RestoreInParallel=false`) but they still shared these generated files.
dotnet#40206 worked around the same mechanism for `Controls.Core` with
explicit package references.

**Fix.** For the build-task restore only, `Directory.Build.props` sets
`MSBuildProjectExtensionsPath` to
`$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes
`nuget.g.*`, `project.assets.json` and dgspec files under
`artifacts/obj/<project>/buildtasks/`. The full restore and build keep
the default `artifacts/obj/<project>/` path, and the full restore's
evaluations never read the reduced files. Arcade's `ProjectLayout.props`
sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props`
defaults `MSBuildProjectExtensionsPath` after importing
`Directory.Build.props`, so this is the supported place to set it.
Nothing in the repo reads these paths directly. Other
`BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`,
`eng/pipelines/arcade/setup-test-env.yml`) restore before every later
build, so they also stop overwriting the full assets. The comment in
`eng/Build.props` is updated to match.

Rejected alternatives:
- `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change.
- More explicit package references, as in dotnet#40206: a per-project
workaround that doesn't remove the shared state.
- Disabling project-extension imports: unsafe.

### Validation

All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`.

**Minimal standalone repro.** A local package with `build/net10.0`
targets, consumed by a library whose TFMs shrink from `net11.0;net10.0`
to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the
reduced restore, then the full restore, then reads the package marker
for `net10.0`:

| Run | Result |
| --- | --- |
| Baseline | marker missing (red) |
| Fix | marker present (green) |
| Fix reverted | marker missing (red) |
| Fix restored | marker present (green) |
| Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present
(green): the in-proc XML cache is the mechanism |

**Repo-level repro, in Arcade's order.** The driver runs a
`BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full
`Controls.Xaml` restore, then an evaluation of `Controls.Xaml`
`net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs
used `CI=true -p:IncludeMacOSTargetFrameworks=false`.
`MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction,
which makes the CI intermittency deterministic:

| Run | AndroidAarLibrary (all / Material) | Package imports in the
build-phase android evaluation |
| --- | --- | --- |
| Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` |
| Fix | 69 / 1 (green) | 133 |
| Fix reverted | 0 / 0 (red) | — |
| Fix restored | 69 / 1 (green) | — |

With default cache settings the baseline was green locally (69/1), which
is consistent with the eviction-dependent intermittency seen in CI.

**Other checks.**
- Evaluation with `BuildTaskOnlyBuild=true`:
`MSBuildProjectExtensionsPath`, `RestoreOutputPath` and
`ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`.
Without it they stay at `artifacts/obj/Controls.Xaml/`.
- `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug
-p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build
succeeded, 0 warnings. All 12 restored projects wrote their assets under
`artifacts/obj/<project>/buildtasks/`.

The CI proof will be a Pack run's Windows binlog: the full restore's
evaluations should no longer import a normal-path `nuget.g.targets`
written by the build-task restore.

### Issues Fixed

Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue
is filed; this was found while triaging dotnet#40116 CI.

Fixes #

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KarthikRajaKalaimani pushed a commit to KarthikRajaKalaimani/maui that referenced this pull request Nov 26, 2026
…path (APT2260) (dotnet#40406)

<!-- 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

Build infrastructure only; no product or test code changes.

**Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail
intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0`
`Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other
Material attributes. Recent examples are net11 maui-pr
[1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582)
and candidate maui-pr
[1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577).
There have been 6 Pack and 2 Build Windows failures since 15 Nov, across
branches.

**Root cause.** `eng/Build.props` restores
`Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first,
then the full solution filter, in the same MSBuild process:
1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in
`Directory.Build.props`. The first restore therefore writes a reduced
`artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with
import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`.
2. The full restore's evaluations parse those same files into the
in-process `ProjectRootElementCache`, then rewrite them with all TFMs.
3. That cache does not revalidate timestamps: it is created with
`autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the
rest weakly. Later build evaluations can reuse the stale reduced XML, so
platform TFMs lose their `buildTransitive` package imports, including
the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether
the stale entry survives depends on cache eviction and GC, which is why
the failure is intermittent.

CI binlogs show this directly. In failing build 1688582, the build-phase
evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core`
(ios/windows) and `Graphics` (android/windows) have zero package imports
from the `nuget.g.targets`. Passing net11 build
[1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936)
has the normal import counts. dotnet#39779 serialized the two restores
(`RestoreInParallel=false`) but they still shared these generated files.
dotnet#40206 worked around the same mechanism for `Controls.Core` with
explicit package references.

**Fix.** For the build-task restore only, `Directory.Build.props` sets
`MSBuildProjectExtensionsPath` to
`$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes
`nuget.g.*`, `project.assets.json` and dgspec files under
`artifacts/obj/<project>/buildtasks/`. The full restore and build keep
the default `artifacts/obj/<project>/` path, and the full restore's
evaluations never read the reduced files. Arcade's `ProjectLayout.props`
sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props`
defaults `MSBuildProjectExtensionsPath` after importing
`Directory.Build.props`, so this is the supported place to set it.
Nothing in the repo reads these paths directly. Other
`BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`,
`eng/pipelines/arcade/setup-test-env.yml`) restore before every later
build, so they also stop overwriting the full assets. The comment in
`eng/Build.props` is updated to match.

Rejected alternatives:
- `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change.
- More explicit package references, as in dotnet#40206: a per-project
workaround that doesn't remove the shared state.
- Disabling project-extension imports: unsafe.

### Validation

All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`.

**Minimal standalone repro.** A local package with `build/net10.0`
targets, consumed by a library whose TFMs shrink from `net11.0;net10.0`
to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the
reduced restore, then the full restore, then reads the package marker
for `net10.0`:

| Run | Result |
| --- | --- |
| Baseline | marker missing (red) |
| Fix | marker present (green) |
| Fix reverted | marker missing (red) |
| Fix restored | marker present (green) |
| Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present
(green): the in-proc XML cache is the mechanism |

**Repo-level repro, in Arcade's order.** The driver runs a
`BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full
`Controls.Xaml` restore, then an evaluation of `Controls.Xaml`
`net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs
used `CI=true -p:IncludeMacOSTargetFrameworks=false`.
`MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction,
which makes the CI intermittency deterministic:

| Run | AndroidAarLibrary (all / Material) | Package imports in the
build-phase android evaluation |
| --- | --- | --- |
| Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` |
| Fix | 69 / 1 (green) | 133 |
| Fix reverted | 0 / 0 (red) | — |
| Fix restored | 69 / 1 (green) | — |

With default cache settings the baseline was green locally (69/1), which
is consistent with the eviction-dependent intermittency seen in CI.

**Other checks.**
- Evaluation with `BuildTaskOnlyBuild=true`:
`MSBuildProjectExtensionsPath`, `RestoreOutputPath` and
`ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`.
Without it they stay at `artifacts/obj/Controls.Xaml/`.
- `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug
-p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build
succeeded, 0 warnings. All 12 restored projects wrote their assets under
`artifacts/obj/<project>/buildtasks/`.

The CI proof will be a Pack run's Windows binlog: the full restore's
evaluations should no longer import a normal-path `nuget.g.targets`
written by the build-task restore.

### Issues Fixed

Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue
is filed; this was found while triaging dotnet#40116 CI.

Fixes #

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo added a commit that referenced this pull request Nov 29, 2026
<!-- copilot-assessment:v1 -->
### Agent assessment

| Assessment | Evidence |
| --- | --- |
| Change confidence | Medium-high — ↑ Windows-only product change;
1704239 and 1704247 each passed 92 Shell tests in both Windows
modes<br>↑ Final head 1704247 passed 29 Window and 3 WindowOverlay tests
per mode, including real drawing and adorner attachment<br>↓ Full CI
remains red; iOS General and a Windows Entry mismatch are not dismissed
|
| Diagnosis confidence | Medium-high — ↑ Build 1704155 log and
crash.sequence.log identify SearchHandlerFocusTracksDetachment(True,
False)<br>↑ Downloaded native-process-4328.dmp contains 0x80070490
stowed stacks, symbolized using exact Microsoft PDB identities: Win2D
CanvasControl.OnLoaded → RegisterEventHandlers →
CoreApplication.add_Resuming → GetCurrentView; OnUnloaded →
UnregisterEventHandlers → remove_Resuming → GetViewFromTid<br>↓ Stowed
records establish the failing native mechanism, not the precise timing
of every focus/navigation operation |
| Evidence fit | ↑ Empty visual diagnostics overlays instantiate Win2D
CanvasControl from Loaded despite Visibility.Collapsed; dump has 14
VisualDiagnosticsOverlay/W2DGraphicsView objects<br>↑ Fix prevents this
unnecessary native lifecycle path without changing SearchHandler or
NavigationPage<br>↑ Builds 1704239 and 1704247: both Windows Shell
categories passed with zero failures/skips; final head also passed the
related Window/WindowOverlay categories<br>↓ Two runs strengthen but do
not prove elimination of an intermittent crash; broader CI has explicit
unmatched failures |

Head SHA: `63766cca9b0694b3d6039edd43a34729b8d697b7`
<!-- /copilot-assessment -->

<!-- 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!

<!--
Open .NET 11 fix PRs against net11 for review; target main for
next-major features.
After approval, a maintainer manually retargets the fix PR to the active
inflight
branch and merges it directly there. Do not merge individual fixes into
net11.
Bots must not retarget or merge. Candidate integration into net11 and
release/*
changes are separate, explicitly coordinated release work.
-->

### Target Branch

| This PR is for | Initial base |
| --- | --- |
| New features, API changes, or .NET 12 work (including .NET 12 fixes) |
`main` |
| .NET 11 servicing fixes | `net11`, for review |
| Older servicing, release integration, infrastructure, or documentation
| The branch designated for that work |

- [x] I selected the applicable base branch using the [contribution
guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting).

For .NET 11 fixes, only a maintainer retargets the approved PR to the
active
inflight lane and merges it after CI validates that final base. Do not
merge
individual fixes directly into `net11`; agents must not retarget or
merge.

### Description of Change

<!-- Enter description of the fix in this section -->

Keep an empty Windows window overlay out of the native visual tree until
it has something to draw. The public graphics view remains available,
and initialized/populated overlays still attach and draw. Once used, the
existing hide/show and teardown behavior remains unchanged.

This addresses the Windows Controls Shell host crash observed in [main
build
1704155](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1704155),
also reported in 1704212. The log and sequence identify
`SearchHandlerFocusTracksDetachment(replaceSearchHandler: True,
disconnectHandler: False)`, but the dump's native stowed stacks point to
Win2D's application lifecycle callbacks—not the SearchHandler focus
callbacks. Collapsed controls still load, and `WindowHandler.MapContent`
initializes a hidden diagnostic overlay for every window.
`CoreApplication.GetCurrentView` / `GetViewFromTid` can return
ELEMENT_NOT_FOUND while the native view is unavailable.

The dump was downloaded and inspected on macOS. `dotnet-dump analyze`
explicitly rejects Windows dumps on macOS; LLDB opened it but could not
unwind useful native frames. Reading the minidump memory directly
recovered the native SE02 stowed exception records, then exact matching
Microsoft symbol-server PDBs resolved their addresses. The managed
COMException objects contain the same HRESULT but no managed stack
trace. The raw dump itself is not claimed as sufficient evidence.

The existing AdornerLayerAdded test now requests an actual adorner and
waits for its layer to load, instead of requiring an empty layer to be
attached. Tests preserve every SearchHandler focus/detachment case and
assert the diagnostic overlay stays detached. New Windows overlay cases
check empty initialization, first-element drawing, prepopulated
initialization and hiding after removal.

**Duplicate search:** checked open and recently merged PRs across main,
net11, release, candidate and inflight branches for the test,
ShellItemHandler, CanvasControl, Win2D and overlay mechanisms. #39779
added the focus coverage; #35079 added Windows focus requests. #40659 is
broader diagnostics trimming and switch/default work, not this native
attachment fix. #40802 owns NavigationPage continuation deferral and is
untouched; #40796 is untouched.

**Validation:**
- `git diff --check`: passed.
- `dotnet format Microsoft.Maui.sln --no-restore --include
src/Core/src/WindowOverlay/WindowOverlay.Windows.cs
src/Controls/tests/DeviceTests/Elements/Window/WindowOverlayTests.cs
src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.Windows.cs
--exclude Templates/src --exclude-diagnostics CA1822`: completed with
missing-reference workspace warnings; native compilation/formatting
coverage is not established.
- Windows tests cannot be built or run on this macOS host. Native PR CI
validation and the baseline comparison are recorded below.


### 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. -->

No linked issue; root-caused from device-test CI logs and crash
artifacts for builds 1704155 and 1704212.

### Let AI finish this PR

- [ ] **Let the MAUI agent address review feedback and fix remaining
issues on this PR.** Maintainers still decide whether it is merged. For
PRs from forks, the agent opens a follow-up PR that keeps your commits.

<!--
Verify the target branch follows the release workflow in
docs/ReleaseBranchWorkflow.md.
Infrastructure and documentation changes should target the branch where
they apply.
-->


### CI progression

- **1704237:** canceled before execution; not validation.
- **1704239**, initial head `16ba04224f3edf252a38b2a9a552906a724827bf`:
Windows packaged and unpackaged **Shell passed**; unpackaged
WindowOverlay **3 passed**, including populated rendering and
prepopulated initialization. Existing AdornerLayerAdded failed because
it assumed empty overlays were already attached; corrected in the latest
test-only commit.
- Both Windows Controls jobs still crash in
`NavigationPage.SettingTitleIconImageSourceDoesntCrash` (owned by
#40802). Windows Core
ReplacingVirtualViewUpdatesLayoutAndReleasesOldPress has the exact same
0x0 bounds failure as baseline 1704155 (owned by #40800).
- iOS Controls General had 17 failures in 1704239 (back-button lookup
and page-transition timing); baseline 1704155 was green. This is
explicitly **not** a clean cross-platform result; revalidation is
pending. All other completed iOS jobs passed; Catalyst Controls was
still running at collection time.


- **1704242:** Windows compilation exposed a missing explicit bool
argument on the IVisualDiagnosticsOverlay.AddAdorner interface call in
the updated test. Fixed with `AddAdorner(mainPage, false)`; this run is
**not** native validation. The wait now requires the native drawing
child itself to be loaded before teardown.


### Final native validation and baseline comparison

| Build | Head | Packaged Shell | Unpackaged Shell |
| --- | --- | --- | --- |
|
[1704239](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1704239)
| Initial product fix `16ba04224f` | 92 passed, 0 failed/skipped | 92
passed, 0 failed/skipped |
|
[1704247](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1704247)
| Final `63766cca9b` | 92 passed, 0 failed/skipped | 92 passed, 0
failed/skipped |

The product fix is identical across these two runs; subsequent commits
only corrected the directly related adorner test. The final merge SHA
was `4db1d797fdfcb4a16cd3c3ec7b2c10ba04f2208e`, validating PR head
`63766cca9b0694b3d6039edd43a34729b8d697b7`.

**Final head:** Window category **29 passed per Windows mode**;
WindowOverlay **3 passed per mode**, including populated/prepopulated
drawing. Unpackaged logs explicitly record all three
SearchHandlerFocusTracksDetachment cases. Evidence: 1704247 logs [736
(packaged)](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1704247/logs/736)
and [752
(unpackaged)](https://dev.azure.com/dnceng-public/public/_apis/build/builds/1704247/logs/752).
Both also report successful Shell TRX output.

**Evidence strength:** two green Shell runs per mode, exact symbolized
crash mechanism and focused regression coverage give materially stronger
evidence than a single retry. This is not statistical proof of
eliminating every possible intermittent crash.

**Broader CI is not all-green.** Against baseline 1704155 (all Apple
jobs green), final 1704247 has all five Catalyst jobs and seven of eight
iOS jobs green. iOS Controls General has **17 failures**, also seen in
1704239, involving tabbed bar backgrounds, ScrollView layout, overflow
page transitions and back-button lookup. These have no changed Apple
product path in this Windows-only fix, but remain **unmatched, needing
separate investigation**, not silently dismissed as known flakes. Final
unpackaged Windows also has an unmatched
Entry.UnFocusOnEntryAfterPagePop event-count assertion failure; it
passed in 1704239 and baseline 1704155. This is explicitly not a claim
of full cross-platform CI cleanliness.

The known NavigationPage native crash still occurs in both Windows modes
and belongs to #40802. Windows Core's ContentButton 0x0-layout assertion
matches baseline 1704155 exactly and belongs to #40800. No changes from
either sibling fix were duplicated.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants