Repository navigation
[Build] Restore Controls native dependencies during candidate packing - #40206
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/rebase |
Reference the centrally versioned Material and WebView2 packages directly from their Controls platform consumers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
7b1fcca to
70dbc29
Compare
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. |
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 70dbc29.
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-uitestsMatched Apple failures below have identical target reasons/stacks; neither new platform-conditioned reference applies to Apple.
🧭 Follow-up — actions and refreshNext action: Diagnose versioning/native-output production, inspect flagged sessions/snapshots, and restore canceled-shard evidence; do not update baselines blindly.
|
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…path (APT2260) (#40406) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Build infrastructure only; no product or test code changes. **Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0` `Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other Material attributes. Recent examples are net11 maui-pr [1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582) and candidate maui-pr [1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577). There have been 6 Pack and 2 Build Windows failures since 15 Nov, across branches. **Root cause.** `eng/Build.props` restores `Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first, then the full solution filter, in the same MSBuild process: 1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in `Directory.Build.props`. The first restore therefore writes a reduced `artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`. 2. The full restore's evaluations parse those same files into the in-process `ProjectRootElementCache`, then rewrite them with all TFMs. 3. That cache does not revalidate timestamps: it is created with `autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the rest weakly. Later build evaluations can reuse the stale reduced XML, so platform TFMs lose their `buildTransitive` package imports, including the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether the stale entry survives depends on cache eviction and GC, which is why the failure is intermittent. CI binlogs show this directly. In failing build 1688582, the build-phase evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core` (ios/windows) and `Graphics` (android/windows) have zero package imports from the `nuget.g.targets`. Passing net11 build [1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936) has the normal import counts. #39779 serialized the two restores (`RestoreInParallel=false`) but they still shared these generated files. #40206 worked around the same mechanism for `Controls.Core` with explicit package references. **Fix.** For the build-task restore only, `Directory.Build.props` sets `MSBuildProjectExtensionsPath` to `$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes `nuget.g.*`, `project.assets.json` and dgspec files under `artifacts/obj/<project>/buildtasks/`. The full restore and build keep the default `artifacts/obj/<project>/` path, and the full restore's evaluations never read the reduced files. Arcade's `ProjectLayout.props` sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props` defaults `MSBuildProjectExtensionsPath` after importing `Directory.Build.props`, so this is the supported place to set it. Nothing in the repo reads these paths directly. Other `BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`, `eng/pipelines/arcade/setup-test-env.yml`) restore before every later build, so they also stop overwriting the full assets. The comment in `eng/Build.props` is updated to match. Rejected alternatives: - `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change. - More explicit package references, as in #40206: a per-project workaround that doesn't remove the shared state. - Disabling project-extension imports: unsafe. ### Validation All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`. **Minimal standalone repro.** A local package with `build/net10.0` targets, consumed by a library whose TFMs shrink from `net11.0;net10.0` to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the reduced restore, then the full restore, then reads the package marker for `net10.0`: | Run | Result | | --- | --- | | Baseline | marker missing (red) | | Fix | marker present (green) | | Fix reverted | marker missing (red) | | Fix restored | marker present (green) | | Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present (green): the in-proc XML cache is the mechanism | **Repo-level repro, in Arcade's order.** The driver runs a `BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full `Controls.Xaml` restore, then an evaluation of `Controls.Xaml` `net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs used `CI=true -p:IncludeMacOSTargetFrameworks=false`. `MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction, which makes the CI intermittency deterministic: | Run | AndroidAarLibrary (all / Material) | Package imports in the build-phase android evaluation | | --- | --- | --- | | Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` | | Fix | 69 / 1 (green) | 133 | | Fix reverted | 0 / 0 (red) | — | | Fix restored | 69 / 1 (green) | — | With default cache settings the baseline was green locally (69/1), which is consistent with the eviction-dependent intermittency seen in CI. **Other checks.** - Evaluation with `BuildTaskOnlyBuild=true`: `MSBuildProjectExtensionsPath`, `RestoreOutputPath` and `ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`. Without it they stay at `artifacts/obj/Controls.Xaml/`. - `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build succeeded, 0 warnings. All 12 restored projects wrote their assets under `artifacts/obj/<project>/buildtasks/`. The CI proof will be a Pack run's Windows binlog: the full restore's evaluations should no longer import a normal-path `nuget.g.targets` written by the build-task restore. ### Issues Fixed Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue is filed; this was found while triaging #40116 CI. Fixes # Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…path (APT2260) (dotnet#40406) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Build infrastructure only; no product or test code changes. **Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0` `Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other Material attributes. Recent examples are net11 maui-pr [1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582) and candidate maui-pr [1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577). There have been 6 Pack and 2 Build Windows failures since 15 Nov, across branches. **Root cause.** `eng/Build.props` restores `Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first, then the full solution filter, in the same MSBuild process: 1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in `Directory.Build.props`. The first restore therefore writes a reduced `artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`. 2. The full restore's evaluations parse those same files into the in-process `ProjectRootElementCache`, then rewrite them with all TFMs. 3. That cache does not revalidate timestamps: it is created with `autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the rest weakly. Later build evaluations can reuse the stale reduced XML, so platform TFMs lose their `buildTransitive` package imports, including the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether the stale entry survives depends on cache eviction and GC, which is why the failure is intermittent. CI binlogs show this directly. In failing build 1688582, the build-phase evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core` (ios/windows) and `Graphics` (android/windows) have zero package imports from the `nuget.g.targets`. Passing net11 build [1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936) has the normal import counts. dotnet#39779 serialized the two restores (`RestoreInParallel=false`) but they still shared these generated files. dotnet#40206 worked around the same mechanism for `Controls.Core` with explicit package references. **Fix.** For the build-task restore only, `Directory.Build.props` sets `MSBuildProjectExtensionsPath` to `$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes `nuget.g.*`, `project.assets.json` and dgspec files under `artifacts/obj/<project>/buildtasks/`. The full restore and build keep the default `artifacts/obj/<project>/` path, and the full restore's evaluations never read the reduced files. Arcade's `ProjectLayout.props` sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props` defaults `MSBuildProjectExtensionsPath` after importing `Directory.Build.props`, so this is the supported place to set it. Nothing in the repo reads these paths directly. Other `BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`, `eng/pipelines/arcade/setup-test-env.yml`) restore before every later build, so they also stop overwriting the full assets. The comment in `eng/Build.props` is updated to match. Rejected alternatives: - `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change. - More explicit package references, as in dotnet#40206: a per-project workaround that doesn't remove the shared state. - Disabling project-extension imports: unsafe. ### Validation All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`. **Minimal standalone repro.** A local package with `build/net10.0` targets, consumed by a library whose TFMs shrink from `net11.0;net10.0` to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the reduced restore, then the full restore, then reads the package marker for `net10.0`: | Run | Result | | --- | --- | | Baseline | marker missing (red) | | Fix | marker present (green) | | Fix reverted | marker missing (red) | | Fix restored | marker present (green) | | Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present (green): the in-proc XML cache is the mechanism | **Repo-level repro, in Arcade's order.** The driver runs a `BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full `Controls.Xaml` restore, then an evaluation of `Controls.Xaml` `net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs used `CI=true -p:IncludeMacOSTargetFrameworks=false`. `MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction, which makes the CI intermittency deterministic: | Run | AndroidAarLibrary (all / Material) | Package imports in the build-phase android evaluation | | --- | --- | --- | | Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` | | Fix | 69 / 1 (green) | 133 | | Fix reverted | 0 / 0 (red) | — | | Fix restored | 69 / 1 (green) | — | With default cache settings the baseline was green locally (69/1), which is consistent with the eviction-dependent intermittency seen in CI. **Other checks.** - Evaluation with `BuildTaskOnlyBuild=true`: `MSBuildProjectExtensionsPath`, `RestoreOutputPath` and `ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`. Without it they stay at `artifacts/obj/Controls.Xaml/`. - `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build succeeded, 0 warnings. All 12 restored projects wrote their assets under `artifacts/obj/<project>/buildtasks/`. The CI proof will be a Pack run's Windows binlog: the full restore's evaluations should no longer import a normal-path `nuget.g.targets` written by the build-task restore. ### Issues Fixed Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue is filed; this was found while triaging dotnet#40116 CI. Fixes # Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for #40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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>
…path (APT2260) (dotnet#40406) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Build infrastructure only; no product or test code changes. **Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0` `Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other Material attributes. Recent examples are net11 maui-pr [1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582) and candidate maui-pr [1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577). There have been 6 Pack and 2 Build Windows failures since 15 Nov, across branches. **Root cause.** `eng/Build.props` restores `Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first, then the full solution filter, in the same MSBuild process: 1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in `Directory.Build.props`. The first restore therefore writes a reduced `artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`. 2. The full restore's evaluations parse those same files into the in-process `ProjectRootElementCache`, then rewrite them with all TFMs. 3. That cache does not revalidate timestamps: it is created with `autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the rest weakly. Later build evaluations can reuse the stale reduced XML, so platform TFMs lose their `buildTransitive` package imports, including the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether the stale entry survives depends on cache eviction and GC, which is why the failure is intermittent. CI binlogs show this directly. In failing build 1688582, the build-phase evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core` (ios/windows) and `Graphics` (android/windows) have zero package imports from the `nuget.g.targets`. Passing net11 build [1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936) has the normal import counts. dotnet#39779 serialized the two restores (`RestoreInParallel=false`) but they still shared these generated files. dotnet#40206 worked around the same mechanism for `Controls.Core` with explicit package references. **Fix.** For the build-task restore only, `Directory.Build.props` sets `MSBuildProjectExtensionsPath` to `$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes `nuget.g.*`, `project.assets.json` and dgspec files under `artifacts/obj/<project>/buildtasks/`. The full restore and build keep the default `artifacts/obj/<project>/` path, and the full restore's evaluations never read the reduced files. Arcade's `ProjectLayout.props` sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props` defaults `MSBuildProjectExtensionsPath` after importing `Directory.Build.props`, so this is the supported place to set it. Nothing in the repo reads these paths directly. Other `BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`, `eng/pipelines/arcade/setup-test-env.yml`) restore before every later build, so they also stop overwriting the full assets. The comment in `eng/Build.props` is updated to match. Rejected alternatives: - `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change. - More explicit package references, as in dotnet#40206: a per-project workaround that doesn't remove the shared state. - Disabling project-extension imports: unsafe. ### Validation All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`. **Minimal standalone repro.** A local package with `build/net10.0` targets, consumed by a library whose TFMs shrink from `net11.0;net10.0` to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the reduced restore, then the full restore, then reads the package marker for `net10.0`: | Run | Result | | --- | --- | | Baseline | marker missing (red) | | Fix | marker present (green) | | Fix reverted | marker missing (red) | | Fix restored | marker present (green) | | Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present (green): the in-proc XML cache is the mechanism | **Repo-level repro, in Arcade's order.** The driver runs a `BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full `Controls.Xaml` restore, then an evaluation of `Controls.Xaml` `net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs used `CI=true -p:IncludeMacOSTargetFrameworks=false`. `MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction, which makes the CI intermittency deterministic: | Run | AndroidAarLibrary (all / Material) | Package imports in the build-phase android evaluation | | --- | --- | --- | | Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` | | Fix | 69 / 1 (green) | 133 | | Fix reverted | 0 / 0 (red) | — | | Fix restored | 69 / 1 (green) | — | With default cache settings the baseline was green locally (69/1), which is consistent with the eviction-dependent intermittency seen in CI. **Other checks.** - Evaluation with `BuildTaskOnlyBuild=true`: `MSBuildProjectExtensionsPath`, `RestoreOutputPath` and `ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`. Without it they stay at `artifacts/obj/Controls.Xaml/`. - `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build succeeded, 0 warnings. All 12 restored projects wrote their assets under `artifacts/obj/<project>/buildtasks/`. The CI proof will be a Pack run's Windows binlog: the full restore's evaluations should no longer import a normal-path `nuget.g.targets` written by the build-task restore. ### Issues Fixed Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue is filed; this was found while triaging dotnet#40116 CI. Fixes # Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…path (APT2260) (dotnet#40406) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Build infrastructure only; no product or test code changes. **Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0` `Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other Material attributes. Recent examples are net11 maui-pr [1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582) and candidate maui-pr [1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577). There have been 6 Pack and 2 Build Windows failures since 15 Nov, across branches. **Root cause.** `eng/Build.props` restores `Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first, then the full solution filter, in the same MSBuild process: 1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in `Directory.Build.props`. The first restore therefore writes a reduced `artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`. 2. The full restore's evaluations parse those same files into the in-process `ProjectRootElementCache`, then rewrite them with all TFMs. 3. That cache does not revalidate timestamps: it is created with `autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the rest weakly. Later build evaluations can reuse the stale reduced XML, so platform TFMs lose their `buildTransitive` package imports, including the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether the stale entry survives depends on cache eviction and GC, which is why the failure is intermittent. CI binlogs show this directly. In failing build 1688582, the build-phase evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core` (ios/windows) and `Graphics` (android/windows) have zero package imports from the `nuget.g.targets`. Passing net11 build [1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936) has the normal import counts. dotnet#39779 serialized the two restores (`RestoreInParallel=false`) but they still shared these generated files. dotnet#40206 worked around the same mechanism for `Controls.Core` with explicit package references. **Fix.** For the build-task restore only, `Directory.Build.props` sets `MSBuildProjectExtensionsPath` to `$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes `nuget.g.*`, `project.assets.json` and dgspec files under `artifacts/obj/<project>/buildtasks/`. The full restore and build keep the default `artifacts/obj/<project>/` path, and the full restore's evaluations never read the reduced files. Arcade's `ProjectLayout.props` sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props` defaults `MSBuildProjectExtensionsPath` after importing `Directory.Build.props`, so this is the supported place to set it. Nothing in the repo reads these paths directly. Other `BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`, `eng/pipelines/arcade/setup-test-env.yml`) restore before every later build, so they also stop overwriting the full assets. The comment in `eng/Build.props` is updated to match. Rejected alternatives: - `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change. - More explicit package references, as in dotnet#40206: a per-project workaround that doesn't remove the shared state. - Disabling project-extension imports: unsafe. ### Validation All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`. **Minimal standalone repro.** A local package with `build/net10.0` targets, consumed by a library whose TFMs shrink from `net11.0;net10.0` to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the reduced restore, then the full restore, then reads the package marker for `net10.0`: | Run | Result | | --- | --- | | Baseline | marker missing (red) | | Fix | marker present (green) | | Fix reverted | marker missing (red) | | Fix restored | marker present (green) | | Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present (green): the in-proc XML cache is the mechanism | **Repo-level repro, in Arcade's order.** The driver runs a `BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full `Controls.Xaml` restore, then an evaluation of `Controls.Xaml` `net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs used `CI=true -p:IncludeMacOSTargetFrameworks=false`. `MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction, which makes the CI intermittency deterministic: | Run | AndroidAarLibrary (all / Material) | Package imports in the build-phase android evaluation | | --- | --- | --- | | Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` | | Fix | 69 / 1 (green) | 133 | | Fix reverted | 0 / 0 (red) | — | | Fix restored | 69 / 1 (green) | — | With default cache settings the baseline was green locally (69/1), which is consistent with the eviction-dependent intermittency seen in CI. **Other checks.** - Evaluation with `BuildTaskOnlyBuild=true`: `MSBuildProjectExtensionsPath`, `RestoreOutputPath` and `ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`. Without it they stay at `artifacts/obj/Controls.Xaml/`. - `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build succeeded, 0 warnings. All 12 restored projects wrote their assets under `artifacts/obj/<project>/buildtasks/`. The CI proof will be a Pack run's Windows binlog: the full restore's evaluations should no longer import a normal-path `nuget.g.targets` written by the build-task restore. ### Issues Fixed Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue is filed; this was found while triaging dotnet#40116 CI. Fixes # Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…path (APT2260) (dotnet#40406) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). For .NET 11 fixes, only a maintainer retargets the approved PR to the active inflight lane and merges it after CI validates that final base. Do not merge individual fixes directly into `net11`; agents must not retarget or merge. ### Description of Change Build infrastructure only; no product or test code changes. **Symptom.** Windows `Pack` (and occasionally `Build`) jobs fail intermittently with `APT2260` in `Controls.Xaml` `net11.0-android37.0` `Aapt2Link`: `style attribute 'attr/colorPrimary' not found` and other Material attributes. Recent examples are net11 maui-pr [1688582](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688582) and candidate maui-pr [1688577](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1688577). There have been 6 Pack and 2 Build Windows failures since 15 Nov, across branches. **Root cause.** `eng/Build.props` restores `Microsoft.Maui.BuildTasks.slnf` with `BuildTaskOnlyBuild=true` first, then the full solution filter, in the same MSBuild process: 1. Under CI, `BuildTaskOnlyBuild=true` disables the all-TFM group in `Directory.Build.props`. The first restore therefore writes a reduced `artifacts/obj/<project>/<project>.csproj.nuget.g.props/targets`, with import groups only for `netstandard2.0`, `netstandard2.1` and `net11.0`. 2. The full restore's evaluations parse those same files into the in-process `ProjectRootElementCache`, then rewrite them with all TFMs. 3. That cache does not revalidate timestamps: it is created with `autoReloadFromDisk: false`, keeps 200 strong MRU entries and holds the rest weakly. Later build evaluations can reuse the stale reduced XML, so platform TFMs lose their `buildTransitive` package imports, including the Material `AndroidAarLibrary` items. That produces `APT2260`. Whether the stale entry survives depends on cache eviction and GC, which is why the failure is intermittent. CI binlogs show this directly. In failing build 1688582, the build-phase evaluations of `Controls.Xaml` (ios/android/windows), `Controls.Core` (ios/windows) and `Graphics` (android/windows) have zero package imports from the `nuget.g.targets`. Passing net11 build [1687936](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1687936) has the normal import counts. dotnet#39779 serialized the two restores (`RestoreInParallel=false`) but they still shared these generated files. dotnet#40206 worked around the same mechanism for `Controls.Core` with explicit package references. **Fix.** For the build-task restore only, `Directory.Build.props` sets `MSBuildProjectExtensionsPath` to `$(BaseIntermediateOutputPath)buildtasks\`, so that restore writes `nuget.g.*`, `project.assets.json` and dgspec files under `artifacts/obj/<project>/buildtasks/`. The full restore and build keep the default `artifacts/obj/<project>/` path, and the full restore's evaluations never read the reduced files. Arcade's `ProjectLayout.props` sets only `BaseIntermediateOutputPath`, and `Microsoft.Common.props` defaults `MSBuildProjectExtensionsPath` after importing `Directory.Build.props`, so this is the supported place to set it. Nothing in the repo reads these paths directly. Other `BuildTaskOnlyBuild` callers (`eng/cake/dotnet.cake`, `eng/pipelines/arcade/setup-test-env.yml`) restore before every later build, so they also stop overwriting the full assets. The comment in `eng/Build.props` is updated to match. Rejected alternatives: - `MSBUILDNOINPROCNODE=1`: pipeline-wide behaviour change. - More explicit package references, as in dotnet#40206: a per-project workaround that doesn't remove the shared state. - Disabling project-extension imports: unsafe. ### Validation All runs used SDK 11.0.100 with `dotnet msbuild -m:1 -nodeReuse:false`. **Minimal standalone repro.** A local package with `build/net10.0` targets, consumed by a library whose TFMs shrink from `net11.0;net10.0` to `net11.0` under `BuildTaskOnlyBuild=true`. The driver runs the reduced restore, then the full restore, then reads the package marker for `net10.0`: | Run | Result | | --- | --- | | Baseline | marker missing (red) | | Fix | marker present (green) | | Fix reverted | marker missing (red) | | Fix restored | marker present (green) | | Control: baseline with `MSBUILDNOINPROCNODE=1` | marker present (green): the in-proc XML cache is the mechanism | **Repo-level repro, in Arcade's order.** The driver runs a `BuildTasks.slnf` restore with `BuildTaskOnlyBuild=true`, then a full `Controls.Xaml` restore, then an evaluation of `Controls.Xaml` `net11.0-android37.0` that counts `AndroidAarLibrary` items. All runs used `CI=true -p:IncludeMacOSTargetFrameworks=false`. `MSBUILDPROJECTROOTELEMENTCACHESIZE=100000` stops strong-cache eviction, which makes the CI intermittency deterministic: | Run | AndroidAarLibrary (all / Material) | Package imports in the build-phase android evaluation | | --- | --- | --- | | Baseline | 0 / 0 (red) | 31: the stale reduced `nuget.g.targets` | | Fix | 69 / 1 (green) | 133 | | Fix reverted | 0 / 0 (red) | — | | Fix restored | 69 / 1 (green) | — | With default cache settings the baseline was green locally (69/1), which is consistent with the eviction-dependent intermittency seen in CI. **Other checks.** - Evaluation with `BuildTaskOnlyBuild=true`: `MSBuildProjectExtensionsPath`, `RestoreOutputPath` and `ProjectAssetsFile` point at `artifacts/obj/Controls.Xaml/buildtasks/`. Without it they stay at `artifacts/obj/Controls.Xaml/`. - `CI=true dotnet build Microsoft.Maui.BuildTasks.slnf -c Debug -p:BuildTaskOnlyBuild=true -p:IncludeMacOSTargetFrameworks=false`: build succeeded, 0 warnings. All 12 restored projects wrote their assets under `artifacts/obj/<project>/buildtasks/`. The CI proof will be a Pack run's Windows binlog: the full restore's evaluations should no longer import a normal-path `nuget.g.targets` written by the build-task restore. ### Issues Fixed Intermittent Windows Pack/Build `APT2260` failures in maui-pr. No issue is filed; this was found while triaging dotnet#40116 CI. Fixes # Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…dotnet#40206) <!-- 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 stabilization of `candidate/11.0.1xx-sr2` for dotnet#40116. The branch was created from `08fbadc06fb09ac8072b09e957984234045cbd2d`. At the publication guard, the candidate is `53f7830c8ac75da171c9c890f29fddc5870cd0e5`; its `Controls.Core.csproj` is unchanged. No rebase, retarget, or merge is performed. ### Description of Change <!-- Enter description of the fix in this section --> Add two explicit, platform-scoped package references in `Controls.Core.csproj`, using the existing central versions: - Android: `Xamarin.Google.Android.Material` supplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles. - Windows: `Microsoft.Web.WebView2` imports the projection compiler reference used directly by Controls' WebView code. The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction. **Failure and validation evidence** The original [maui-pr build 1678467](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678467) fails in Windows Pack: Controls reports `CS1069` for WebView2 types in both Windows TFMs and `APT2260` for missing Android style attributes. Its actual Windows `Csc` inputs contain no WebView2 projection assembly, although RAR found one as a dependency; Android `Aapt2Link` has only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is **not established** here. [Public Pack-only build 1678708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1678708) **succeeded** at exact correction commit `7b1fcca686e8c3e1972c6d3171d89c7a72ed1926`. It used the existing `maui-pr` pipeline 302 with the documented `stagesToSkip` selection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK `11.0.101-servicing.26559.106`, not the local preview SDK. | Native surface | Result | Recorded evidence | | --- | --- | --- | | Windows `net11.0-windows10.0.19041.0` | Passed | Raw log 68, line 2169; actual `Csc` references include `Microsoft.Web.WebView2.Core.Projection.dll` from package 1.0.4258.31 | | Windows `net11.0-windows10.0.20348.0` | Passed | Raw log 68, line 2160; same projection present in actual compiler inputs | | Android `net11.0-android37.0` | Passed | Raw log 68, line 1811; `Aapt2Link` now receives 56 additional resource directories and 85 compiled resource inputs | | Windows Pack | Passed | Raw log 68, lines 2185 and 2201; actual pack binlog has 0 errors | Exact CI commands, with agent checkout roots shown as repository-relative paths: ```text build.sh -ci -warnAsError false -restore -pack -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack-mac.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, macOS raw log 30. ```text build.cmd -ci -restore -pack -publish $(_PublishArgs) -configuration Release /p:SkipInitInternalTooling=true /bl:artifacts/log/Release/pack.binlog /p:OfficialBuildId=20261112.190 /p:_SkipUpdateBuildNumber=true ``` Result: **passed**, Windows raw log 68. The existing unexpanded `_PublishArgs` emits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged. Downloaded and inspected the generated `Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg`: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages. `git diff --check` also passed. The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate. Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update dotnet#39441 changes versions, not these missing Controls references; the open Material3 CarouselView work dotnet#35640 does not change this project file. ### 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 (native Controls Windows Pack failures). <!-- 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.This is explicitly coordinated stabilization of
candidate/11.0.1xx-sr2for #40116. The branch was created from08fbadc06fb09ac8072b09e957984234045cbd2d. At the publication guard, the candidate is53f7830c8ac75da171c9c890f29fddc5870cd0e5; itsControls.Core.csprojis unchanged. No rebase, retarget, or merge is performed.Description of Change
Add two explicit, platform-scoped package references in
Controls.Core.csproj, using the existing central versions:Xamarin.Google.Android.Materialsupplies the Material/AppCompat native-resource dependencies consumed while linking Controls and MAUI native styles.Microsoft.Web.WebView2imports the projection compiler reference used directly by Controls' WebView code.The existing project reference to Core did not supply these native build/compiler inputs during packing. No package versions, assembly hint paths, public API suppressions, styles, tests, or pipeline configuration are changed. This is a five-line project-file correction.
Failure and validation evidence
The original maui-pr build 1678467 fails in Windows Pack: Controls reports
CS1069for WebView2 types in both Windows TFMs andAPT2260for missing Android style attributes. Its actual WindowsCscinputs contain no WebView2 projection assembly, although RAR found one as a dependency; AndroidAapt2Linkhas only 4 additional resource directories and 33 compiled resource inputs. The failed merge's Controls project blob is identical to the starting candidate's. Whether the failure was introduced by candidate integration versus the existing net11 pack baseline is not established here.Public Pack-only build 1678708 succeeded at exact correction commit
7b1fcca686e8c3e1972c6d3171d89c7a72ed1926. It used the existingmaui-prpipeline 302 with the documentedstagesToSkipselection for Build, HelixTests, and IntegrationTests; the real macOS and Windows Pack jobs ran without YAML changes or signing/public-feed overrides. Provisioning used candidate SDK11.0.101-servicing.26559.106, not the local preview SDK.net11.0-windows10.0.19041.0Cscreferences includeMicrosoft.Web.WebView2.Core.Projection.dllfrom package 1.0.4258.31net11.0-windows10.0.20348.0net11.0-android37.0Aapt2Linknow receives 56 additional resource directories and 85 compiled resource inputsExact CI commands, with agent checkout roots shown as repository-relative paths:
Result: passed, macOS raw log 30.
Result: passed, Windows raw log 68. The existing unexpanded
_PublishArgsemits a nonfatal PowerShell command-not-found message before the build proceeds; that separate pipeline issue is intentionally unchanged.Downloaded and inspected the generated
Microsoft.Maui.Controls.Core.11.0.20-ci.main.26562.190.nupkg: it contains all eight framework assemblies, including both Windows TFMs and Android 37. Its Android dependency group pins Material 1.14.0.5 and both Windows groups pin WebView2 1.0.4258.31, matching Core's existing central versions. Non-platform evaluation excludes both added packages.git diff --checkalso passed.The existing failed baseline and successful corrected native run establish the observed repair; a separate fix-reverted/restored CI cycle was not run. Build/Helix/integration tests were not run in this scoped validation, and this PR does not claim that the whole candidate or the unrelated Windows Essentials crash is resolved. Final merge-base CI remains separate.
Upstream open/recently merged searches and the relevant project-file diffs found no duplicate correction. The Windows dependency-version update #39441 changes versions, not these missing Controls references; the open Material3 CarouselView work #35640 does not change this project file.
Issues Fixed
Relates to #40116 (native Controls Windows Pack failures).