Repository navigation
Conversation
…36256) #36730 removed the invalid (IView) cast from both content-property assignment sites in UpdateComponentCodeWriter, but only the root/direct replacement site had regression coverage. Add a generator guard and a live metadata-update test for content set inside newly created content containers (RefreshView > Border > ScrollView > Label). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40231Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40231" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
PR Test Gate
🧪 Gate analysis — click to expand⚠ Inconclusive. Setup, build, or execution did not produce a conclusive result. This does not prove the fix is incorrect. No interpretable test-group summary was produced. No additional test execution is inferred. Setup did not capture a verified PR head; no commit is claimed as tested. No immutable without-fix baseline was prepared. |
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit 21c1233.
Source assessment incomplete (6/7 dimensions); finding count is partial.
This comment has been minimized.
This comment has been minimized.
Tests Failure Analysis
🧪 CI Analysis — click to expand📊 maui-pr
🧪 maui-pr-devicetests
🧪 maui-pr-uitests
🧭 Follow-up — actions and refreshNext action: Inspect unresolved unit/device logs; compare unresolved UI cases on identical
|
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…36256) (#40231) <!-- 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 **Test-only change. No product code is modified.** #36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already in `net11.0`, `net11`, and `main`. #36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for #36256 (already fixed by #36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
<!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from #40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added #40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The #40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The #40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | #21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | #35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | #5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original #5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to #40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…otnet#36256) (dotnet#40231) <!-- 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 **Test-only change. No product code is modified.** dotnet#36256 (incremental XAML Hot Reload emitting `this.Content = (IView)__na_0;`, causing CS0266 and an empty ENC1002) was fixed by dotnet#36730. That fix is already in `net11.0`, `net11`, and `main`. dotnet#36730 removed the `(IView)` cast from **two** content-property assignment sites in `UpdateComponentCodeWriter`: 1. `EmitContentPropertyChange`: replacing the content of an existing container, root or nested. This is covered by `XamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanly` and `StructuralHotReloadTests.RootComplexElementProperty_*`. 2. `EmitNewElementChildren` (non-layout branch): setting the content of a **newly created** content container, for example a new `Border`, `ScrollView`, or `RefreshView` whose child is also new. **This site had no coverage.** Re-adding the `(IView)` cast there leaves all 669 SourceGen unit tests green. This PR adds two tests to `StructuralHotReloadTests` that replace the root `Label` with `RefreshView > Border > ScrollView > Label`: - `NewContentContainersWithNewContent_CompileWithoutIViewCast`: a generator guard. It asserts that no `.Content = (global::Microsoft.Maui.IView)` is emitted and that the generated `UpdateComponent` compiles. - `NewContentContainersWithNewContent_AppliesToExistingPage`: a live `[MetadataUpdateFact]`. It applies the delta to the retained page and checks the full content hierarchy. The `HotReload/AiAssisted/README.md` coverage index is updated to list both tests. Before settling on test coverage, I also probed other content-property shapes on the current code: nested `Border`, `ScrollView`, `ContentView`, `Frame`, `SwipeView`, `RadioButton` (`object` content), `RefreshView`, and content removal. All of them generate compilable code, so no product fix is needed. ### Validation From a copy of the test output in a path without `~`, with `DOTNET_MODIFIABLE_ASSEMBLIES=debug`, on `net11`: - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted"`: **64 passed**, 0 failed, 0 skipped - `dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests"`: **21 passed**, 0 failed - Mutation check: re-adding `(global::Microsoft.Maui.IView)` in the `EmitNewElementChildren` content assignment makes both new tests **fail with CS0266**. Before this PR, no test failed under that mutation. ### Issues Fixed Adds regression coverage for dotnet#36256 (already fixed by dotnet#36730). --------- Co-authored-by: MAUI release automation <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…et#40252) <!-- 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. This is explicitly coordinated CI coverage repair for `candidate/11.0.1xx-sr2`, not an individual product servicing fix. It targets the authorized candidate lane and does not retarget or merge the release integration PR. ### Description of Change <!-- Enter description of the fix in this section --> `eng/helix.proj` currently describes enabling real metadata updates, but supplies two singular `HelixPreCommand` items. The exact pinned `Microsoft.DotNet.Helix.Sdk` **11.0.0-beta.26559.106** consumes the plural **`HelixPreCommands` property**, not those items. The actual SourceGen work-item console in maui-pr build **1681299**, source **77a87edc03aa2728d7e0a51050da0e424a82c801**, contains the SDK environment exports but no metadata-update export: each audited SourceGen configuration reports **733 passed / 53 skipped / 0 failed**. The SDK creates separate child evaluations for each queue and resolves `IsPosixShell` in its targets import. Replace the ignored items with a `BeforeTargets="CoreTest"` target that appends the native command at execution time: - macOS/POSIX: `export DOTNET_MODIFIABLE_ASSEMBLIES=debug` - Windows/cmd: `set DOTNET_MODIFIABLE_ASSEMBLIES=debug` The target only runs when `HelixTargetQueue` is populated, so the multi-queue parent does not evaluate an unresolved shell condition. Existing SDK precommands are preserved. The misleading cross-shell/no-op comment is corrected. No product code, test guards, tests, budgets, retry policies, or xharness configuration are changed. The existing discovery failure when metadata support is requested but unavailable remains intact. #### Validation All native runs use the **exact CI CLI package `11.0.101-servicing.26559.106`**, SDK **11.0.101**, CoreCLR **11.0.1**, and the exact Helix xUnit console **2.9.3**. Local execution is **managed macOS 26.7 arm64**, whereas the retained CI XML/console is **macOS 15.7.1 arm64**. The candidate head is **dca0930d7167052b18c0fa25b1995fa416c2bb06**; the SourceGen tests and managed runtime dependency sources have no differences from the recorded CI merge above. Dependencies were initially restored using the available SDK 11.0.100. A full restore/build using the isolated pinned SDK encountered uninstalled iOS workloads; rebuilding the neutral managed test graph with the existing restored assets succeeded with the exact pinned SDK. This is not a claim that local Apple workloads or local Windows execution were validated; actual Windows Helix results are documented separately below. Commands below use `dotnet` from the exact pinned SDK on PATH: ```sh dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj -c Release --no-restore -v:q ``` **Both passed**, zero warnings/errors. The exact pinned SDK generated the following existing full-suite work-item command, executed from each configuration's built payload. `HELIX_CORRELATION_PAYLOAD` points to the locally staged pinned CLI and xUnit runner, and `HELIX_WORKITEM_ROOT` to the built payload; the generated SDK environment precommands were executed before this command: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.Controls.SourceGen.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.Controls.SourceGen.UnitTests.deps.json $HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll Microsoft.Maui.Controls.SourceGen.UnitTests.dll -nocolor -xml testResults.xml ``` **Complete Debug and Release suites each produced the following causal controls**, without filters or test changes: | Environment control | Passed | Skipped | Failed/errors | | --- | ---: | ---: | ---: | | Metadata export absent, before | 733 | 53 | 0 | | Generated metadata export enabled | 816 | 0 | 0 | | Metadata export removed again | 733 | 53 | 0 | | Metadata export restored | 816 | 0 | 0 | The removed controls deliberately omit only the metadata export and remove the inherited variable. They are **missing-coverage controls, not baseline-red test failures**. All 53 skipped identities and reasons match the exact retained CI XML. When enabled, those 53 gated methods expand into **83 passing cases** because theory rows execute instead of being represented by one skipped theory. CSS **4**, rude-edit **6**, and Structural **17** cases all pass, including `NewContentContainersWithNewContent_AppliesToExistingPage` from dotnet#40231. Full Debug and Release runs repeated **after pushing commit 087c6de** again passed **816 / 0 skipped / 0 failed/errors each**. This comparison preserves the 733 passing rows and 53 gated identities; it does not assert byte-identical raw display strings, because one truncated diagnostic display differs in escaped CRLF/LF presentation. Pinned-SDK shell configuration inspection commands: ```sh dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=osx.15.arm64.maui.open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri dotnet msbuild eng/helix.proj -nologo -p:HelixTargetQueue=Windows.10.Amd64.Open -t:EnableHotReloadMetadataUpdates,AddDotNetSdk -getProperty:HelixPreCommands,IsPosixShell,DotNetCliPackageUri xmllint --noout eng/helix.proj git diff --check ``` **All passed.** macOS produces only the metadata `export`, Windows only the metadata `set`; both retain PATH, DOTNET_ROOT, telemetry, DOTNET_CLI_HOME and NUGET_PACKAGES setup. The SDK's real `CreateXUnitWorkItems` target also generated the matching existing console command with its unchanged **5-minute work-item timeout**. A temporary, uncommitted MSBuild inspection import captured the automatic `CoreTest` hook for both shells and the real multi-queue Windows child, then deliberately raised `HELIXINSPECTION` before `SendHelixJob` to prevent any manual submission. Those diagnostic stops are expected and are **not successful CI runs**. #### Core unit-test preservation Because the environment precommand applies to every unit work item, the existing **complete Core.UnitTests suite** was also executed with `DOTNET_MODIFIABLE_ASSEMBLIES=debug` using the same isolated pinned SDK/runtime and runner. Missing Core assets were restored for the neutral graph only, using existing command-line switches without changing repository configuration: ```sh dotnet restore src/Core/tests/UnitTests/Core.UnitTests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Debug --no-restore -v:q dotnet build src/Core/tests/UnitTests/Core.UnitTests.csproj -c Release --no-restore -v:q ``` **Restore and both builds passed**, zero build warnings/errors. From each configuration's payload, with the generated SDK environment exports and `DOTNET_MODIFIABLE_ASSEMBLIES=debug` set, the invocation was: ```sh dotnet exec --roll-forward Major --runtimeconfig Microsoft.Maui.UnitTests.runtimeconfig.json --depsfile Microsoft.Maui.UnitTests.deps.json "$HELIX_CORRELATION_PAYLOAD/xunit-runner/tools/netcoreapp2.0/xunit.console.dll" Microsoft.Maui.UnitTests.dll -nocolor -xml "$CORE_RESULTS_XML" ``` `CORE_RESULTS_XML` denotes the retained per-configuration output path (`core-debug-metadata-enabled.xml` or `core-release-metadata-enabled.xml`). **Debug and Release each passed all 1125 tests, with zero skips, failures, or assembly errors.** The unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle passed in both. The existing Core Release runtime configuration explicitly disables `MetadataUpdater.IsSupported`; it was **not overridden**. That Release result proves preservation with the new environment export under the existing Core configuration, not native `ApplyUpdate` support for Core Release. No tests, budgets, guards, or retry settings were modified. #### Actual macOS Helix CI evidence [**maui-pr build 1681332**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681332) tested actual merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, whose parents are candidate **dca0930d7167052b18c0fa25b1995fa416c2bb06** and this PR's immutable head **087c6defdce25f1c4c3107a85a73ee73982af158**. The original work-item XMLs and consoles, audited at **2026-11-14 13:27 UTC**, establish: | Completed macOS configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | Every audited original console contains **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The original submit logs correlate **log 198 / Debug** with Helix job **43f2133d-88ea-4431-be6d-76d8f62866c7**, and **log 193 / Release** with **85c1630e-55de-4ddc-9d89-43575259c3d5**, both on `osx.15.arm64.maui.open`. The newly added dotnet#40231 container case and the unchanged AppInfo lifetime oracle **pass in both actual macOS configurations**. These are completed native CI work-item results, not inferred coverage or a pipeline-summary-only success claim. #### Actual Windows Helix CI evidence The previously waiting Windows SourceGen and Core work items in the same original build **1681332**, at the same merge **0c8757a1b473baf188da41f8bd9e7d0309030cea**, also completed **before the later human-requested cancellation**. The original XMLs and consoles, independently audited at **2026-11-14 13:48 UTC**, establish: | Completed Windows configuration | Assembly | Passed | Skipped / failed / errors | | --- | --- | ---: | --- | | Debug | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Release | SourceGen.UnitTests | 816 | 0 / 0 / 0 | | Debug | Core.UnitTests | 1125 | 0 / 0 / 0 | | Release | Core.UnitTests | 1125 | 0 / 0 / 0 | All four original Windows consoles execute **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The Debug Helix job **9578c3a7-fd82-425d-8e1c-3a6fb85be220** finished at **13:36:06 UTC**, and Release job **0d43c781-0bec-4349-bea1-5b8074d0aecf** at **13:33:19 UTC**, both on `windows.10.amd64.open`. The dotnet#40231 `NewContentContainersWithNewContent_AppliesToExistingPage` case and unchanged `AppInfoSecureStorageReleasesDisposedPredecessor` lifetime oracle **pass in both Windows configurations**. All four Windows XML hashes and their original console metadata commands were checked against the retained evidence receipt. Together with the earlier original macOS results, **all four OS/configuration combinations—macOS Debug/Release and Windows Debug/Release—cover the intended SourceGen and Core change**: SourceGen **816 passed** and Core **1125 passed**, with **zero skips, failures, or assembly errors in each combination**. This claim is limited to those eight completed work items, not the entire pipeline or other unit assemblies. #### Human replacement run: completed full unit stage [**maui-pr build 1681348**](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348), from the human-requested replacement wave, uses the **same merge source 0c8757a**. At the **2026-11-14 14:21 UTC** evidence snapshot, all four unit Helix jobs and **all 50 product work items had finished with exit code 0**. The audit parsed **all 50 original product unit-result XMLs**, excluding the four controller items, and found **no named test failures, assembly errors, per-file count discrepancies, or missing-result gaps**. The replacement build's own submit **log 218 / Release** correlates Windows job **cfa56b1c-ead8-4842-b3a5-61481e75e375** and macOS job **3690b714-32d4-42b7-8ecb-0af5ef13b5a3**; **log 223 / Debug** correlates Windows job **576750e6-3906-40a6-9b2d-d69394b3af9b** and macOS job **3a371b92-feab-4d11-874f-6879297c7a0c**. The Windows Release/Debug jobs finished at **14:10:06 / 14:12:11 UTC**, and macOS Release/Debug at **14:01:21 / 14:01:41 UTC**. The eight replacement Core/SourceGen XMLs and original consoles independently reproduce the coverage result: | Replacement OS/configuration | SourceGen passed | Core passed | Skipped / failed / errors, each assembly | | --- | ---: | ---: | --- | | Windows Release | 816 | 1125 | 0 / 0 / 0 | | macOS Release | 816 | 1125 | 0 / 0 / 0 | | Windows Debug | 816 | 1125 | 0 / 0 / 0 | | macOS Debug | 816 | 1125 | 0 / 0 / 0 | Each original Windows console executes **`set DOTNET_MODIFIABLE_ASSEMBLIES=debug`**, and each macOS console executes **`export DOTNET_MODIFIABLE_ASSEMBLIES=debug`**. The dotnet#40231 container case and unchanged AppInfo lifetime oracle pass in every applicable replacement assembly. XML hashes, outcome counts, focal results, and original metadata commands were checked against the retained receipt. This extends the preservation evidence to the **complete product unit stage**, not only the selected Core/SourceGen assemblies. The **50** figure counts product work items/XML artifacts, **not unique tests**. No aggregate unique-unit-test count is claimed: the historical raw-XML versus monitor counting basis remains unresolved. Existing skips in other unit assemblies remain recorded; the zero-skip statement above applies specifically to Core and SourceGen. #### Remaining CI evidence and limits The original overall Azure build **1681332 was canceled by the human-requested replacement wave**. Its completed original work-item results remain valid evidence, but cancellation is **not a full-pipeline pass**. The replacement runs below use the same recorded merge source **0c8757a1b473baf188da41f8bd9e7d0309030cea**; their broader outcomes are distinct from the validated unit-precommand correction. **Main/integration — [build 1681348](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681348):** the **16:20 UTC** completion audit confirms the exact-source `maui-pr` run **completed SUCCEEDED, with all four stages successful**. All **23 original integration-task summaries** are now audited: **508 passed / 12 existing skipped / 0 failed, total 520 record executions**. The final `Run Integration Tests - Build windows` task completed successfully on its original attempt, starting at **2026-11-14T14:25:57.2433333Z** and finishing at **2026-11-14T15:55:39.5766667Z**. Its original Azure **log 1283 contains 119 physical lines**; line 118 reports **146 passed / 2 existing skipped / 0 failed, total 148**, matching the task's success. That final summary reconciles with the previous 22 own-log summaries to the complete integration result. The previously audited **50-product-work-item unit stage** and all four Core/SourceGen configurations remain preserved. This establishes full **`maui-pr` 1681348 success**, not UI/device-test or whole replacement-wave clearance. **UI — [build 1681349](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681349):** the **15:13 UTC** terminal audit covers **all 129 task/publisher logs and their 129 per-run result sets**. Final published records total **14907 Passed / 302 NotExecuted / 3 Failed** across separate platform/category runs—not unique test methods. **23 eventually successful tasks retained 86 original failed records** in the raw audit, and no originally failed method was dropped from the final published run membership. Existing retries are preserved; these final counts do not certify an initially all-green run. The three final failed records are: | Platform | Case | Final evidence | | --- | --- | --- | | MacCatalyst | dotnet#21814 `VerifyNavigationEventArgs` | Expected navigation-event text was empty | | iOS | dotnet#35490 `NavigationPageChildContentExtendsUnderFloatingTabBar` | Floating-pill screenshot difference 1.66% | | Android API 30 | dotnet#5623 `CollectionViewInfiniteScroll` | Original infinite-scroll timeout persisted | Candidate UI build **1681309** also failed the original dotnet#5623 case before its existing retry passed; the latest target result passed. This is evidence that the failure predates this unit-only configuration delta, not a reason to erase the current failed result. A separate bounded investigation reproduced the original NUnit infinite-scroll failure and is tracing the sample's default scroll-mode contract; **no fix or causal certification is claimed**. That local reproduction uses API 30 ARM64/.NET 11 GA rather than CI's x64 servicing runtime. The remaining UI causes stay under investigation, not attributed to the metadata-precommand change without evidence. **Native/device — [build 1681350](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1681350):** the **15:25 UTC** audit covers **all 61 available original XMLs** from a **62-product-work-item inventory**. Available record executions are **43976 Pass / 1057 existing Skip / 4 Fail**, with **zero assembly errors**. The four failed records are the macOS 15 Mono `MemoryTests.PagesDoNotLeakNavigationPage(False)` and `(True)` cases, plus both Windows Border assertions. The same NavigationPage cases passed on the opposite OS and in the candidate control; their root cause remains **unmatched**, not proven to be caused by this metadata fix. The missing native result is MacCatalyst CoreCLR on macOS 26, `Core Tests`, Helix job **f0ebbdfe-68b9-4fbf-9080-d09c2508e125**, machine **dci-macm1-build-056**: it was **canceled before execution**, with the artificial **-1234** status and **no XML**. The original console explicitly says the work item did not run; this is **not a native crash or a passing test result**. The **15:26 UTC** comparison confirms all **1057 available skip identities, reasons, and multiplicities match candidate build 1681310**. The unexecuted Core work item remains a coverage gap; neither a complete native matrix nor a clean device-test result is claimed. All UI/native/integration totals above are **record executions in their stated scope**, not aggregate unique tests. **Full `maui-pr` build 1681348 success is verified; whole-CI or replacement-wave success is not claimed**: the separate UI/native failures and unexecuted native Core coverage gap remain explicit. The coordinating maintainer session owns the existing investigations and manual CI/review requests. This evidence-only revision adds no source change, commit, push, queue, review reply, thread resolution, or review trigger. The separate **Pester scripts** check remains failed. The [PR run 43597847233](https://github.com/dotnet/maui/actions/runs/43597847233) has **15 failures**; all 15 failure names and the compared key assertion messages match [unchanged candidate run 43594456779](https://github.com/dotnet/maui/actions/runs/43594456779) at **dca0930d7167052b18c0fa25b1995fa416c2bb06**. Those failures predate this one-file Helix correction; no Pester tests were edited, skipped, or weakened to conceal them. This attribution does not turn the failed check green. Upstream open/recently merged PR searches by `HelixPreCommands`, `DOTNET_MODIFIABLE_ASSEMBLIES`, and `helix.proj` found no duplicate configuration correction. ### 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. --> Relates to dotnet#40116. Restores the intended Hot Reload coverage while validating that candidate; does not close its release integration tracking PR. <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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!
Target Branch
mainnet11, for reviewFor .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
Test-only change. No product code is modified.
#36256 (incremental XAML Hot Reload emitting
this.Content = (IView)__na_0;, causing CS0266 and an empty ENC1002) was fixed by #36730. That fix is already innet11.0,net11, andmain. #36730 removed the(IView)cast from two content-property assignment sites inUpdateComponentCodeWriter:EmitContentPropertyChange: replacing the content of an existing container, root or nested. This is covered byXamlIncrementalHotReloadE2ETests.RootContentReplaced_CompilesCleanlyandStructuralHotReloadTests.RootComplexElementProperty_*.EmitNewElementChildren(non-layout branch): setting the content of a newly created content container, for example a newBorder,ScrollView, orRefreshViewwhose child is also new. This site had no coverage. Re-adding the(IView)cast there leaves all 669 SourceGen unit tests green.This PR adds two tests to
StructuralHotReloadTeststhat replace the rootLabelwithRefreshView > Border > ScrollView > Label:NewContentContainersWithNewContent_CompileWithoutIViewCast: a generator guard. It asserts that no.Content = (global::Microsoft.Maui.IView)is emitted and that the generatedUpdateComponentcompiles.NewContentContainersWithNewContent_AppliesToExistingPage: a live[MetadataUpdateFact]. It applies the delta to the retained page and checks the full content hierarchy.The
HotReload/AiAssisted/README.mdcoverage index is updated to list both tests.Before settling on test coverage, I also probed other content-property shapes on the current code: nested
Border,ScrollView,ContentView,Frame,SwipeView,RadioButton(objectcontent),RefreshView, and content removal. All of them generate compilable code, so no product fix is needed.Validation
From a copy of the test output in a path without
~, withDOTNET_MODIFIABLE_ASSEMBLIES=debug, onnet11:dotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~HotReload.AiAssisted": 64 passed, 0 failed, 0 skippeddotnet test Microsoft.Maui.Controls.SourceGen.UnitTests.dll --filter "FullyQualifiedName~XamlIncrementalHotReloadE2ETests": 21 passed, 0 failed(global::Microsoft.Maui.IView)in theEmitNewElementChildrencontent assignment makes both new tests fail with CS0266. Before this PR, no test failed under that mutation.Issues Fixed
Adds regression coverage for #36256 (already fixed by #36730).