Skip to content

[CI] Reduce build and Windows XAML warnings - #38735

Merged
kubaflo merged 1 commit into
mainfrom
rmarinho-ci-warning-cleanup
Oct 24, 2026
Merged

kubaflo merged 1 commit into
mainfrom
rmarinho-ci-warning-cleanup

Conversation

@rmarinho

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Reduce the official-build warning sources that apply to main. This is a partial cleanup, not a claim that the full pipeline is warning-free.

  • Use the existing Microsoft.Build.NoTargets SDK for workloads.csproj. This project orchestrates MSI generation, signing, and manifests rather than producing a managed assembly; its signing hooks remain unchanged.
  • Move the Android native library to Java 17 source/target compatibility and explicit Gradle property assignments, removing obsolete Java 8 option and Gradle DSL warnings without disabling diagnostics.
  • Mark the APIScanFiles analysis artifact and its consuming job as non-production. These are build-output copies used for analysis, not signed shipping packages. Keep APIScan enabled and preserve release-package signing and validation.
  • Add Windows x:DataType and bindable metadata to the known sources used by control templates. Keep the original title binding, converters, and two-way bindings; use TemplateBinding only for the equivalent title-bar margin dependency-property binding.
  • Add checkout-based Pester regression checks to the existing read-only CI gate, and document workload orchestration and APIScan artifact classification.

Validation

  • Both focused Pester suites pass: 10/10. Against an isolated, unchanged main baseline, eight regression checks fail and the two behavior-preservation checks pass.
  • Android native Java compilation and assembleRelease succeeded with --warning-mode=fail.
  • The workload CoreCompile target executes without invoking Csc; evaluation confirms there are no compile inputs, intermediate assembly, or implicit framework references.
  • Changed C# files were formatted; git diff --check passes.

Remaining Work / Draft Status

  • Windows XAML compilation and runtime validation are still required. XamlCompiler.exe and MakePri.exe cannot execute on the macOS validation host; the source-metadata tests do not replace a Windows build.
  • Native TemplateSettings, converter-dependent, and two-way Windows binding warning sites remain. Avoid blanket suppression or replacing bindings when conversion/update semantics differ.
  • The APIScan classification needs confirmation in the official 1ES pipeline. No new full CI run has been verified for this patch.
  • The investigation began with a net11.0 build, but this PR intentionally targets main. The net11.0-only NU5128 package warnings, missing public Material3 API declaration, and template JavaScript signing warning are not included. Service-managed 1ES baseline generation is also outside this patch.

Issues Fixed

No linked GitHub issue. Addresses main-applicable warning sources identified during the official CI investigation.

Use the no-targets SDK for workload orchestration, modernize Android Java and Gradle settings, classify APIScan inputs as non-production, and add Windows binding metadata with regression checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4c71098-17cc-4385-b00e-a2b75ff4d79a
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

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

Or

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

@azure-pipelines

This comment has been minimized.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15397263 is running for windows.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@rmarinho — new AI review results are available based on commit 8001281.

Gate No Tests Confidence Low Platform Windows


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


📋 Pre-Flight — Context & Validation

PR #38735 Pre-Flight

Context

  • Title: [CI] Reduce build and Windows XAML warnings
  • State: Open draft
  • Base: main at f8a2f062a8e1b4686a5a3de93bb69cabc02c8c4a
  • Reviewed head: PR squash commit c965b740de (upstream PR head 8001281654750a7cf12588b9c7e9ddf00f44a677)
  • Issue: No linked GitHub issue. The PR addresses warning sources found during an official-build investigation.
  • Gate: Skipped because the earlier gate detected no tests. The gate was not re-run and gate/content.md was not touched.
  • Target platform: Windows

Problem

Reduce warning sources that apply to main without blanket suppression or behavior changes. This is intentionally a partial cleanup; Windows XAML compilation/runtime validation and official 1ES confirmation remain outstanding.

Existing PR Approach

The direct origin/main...HEAD diff contains 48 files (+425/-69) and uses five mechanisms:

  1. Change src/Workload/workloads.csproj from Microsoft.NET.Sdk to Microsoft.Build.NoTargets while retaining MSI/signing/manifest target ordering.
  2. Modernize src/Core/AndroidNative/maui/build.gradle with Java 17 source/target levels and explicit Gradle property assignments.
  3. Mark only the APIScanFiles artifact and consuming APIScan release job as isProduction: false, leaving APIScan and shipping-package signing enabled.
  4. Reduce Windows XAML trimming/binding warnings by adding precise x:DataType declarations, Windows Bindable metadata on source types, and one equivalent TemplateBinding. The diff also repairs existing self-relative visibility bindings so they continue to bind to the template data context.
  5. Add checkout-based Pester regression coverage and workflow path filters, plus narrowly related documentation.

An alternative must use a different root-cause mechanism rather than relocating the same checks or reproducing these metadata/configuration edits.

Changed Surface

  • Build/pipeline configuration: .github/workflows/powershell-script-tests.yml, eng/pipelines/arcade/stage-api-scan.yml, eng/pipelines/arcade/stage-pack.yml
  • Added regression suites: eng/pipelines/arcade/build-warning-configuration.Tests.ps1, eng/pipelines/arcade/windows-xaml-trimming.Tests.ps1
  • Windows XAML and binding sources under src/Compatibility/Core/src/Windows, src/Controls/src/Core, and src/Core/src/Platform/Windows
  • Android native Gradle configuration
  • Workload orchestration project and related documentation

Bounded Validation

Run only the two focused Pester suites together:

$config = New-PesterConfiguration
$config.Run.Path = @(
  'eng\pipelines\arcade\windows-xaml-trimming.Tests.ps1',
  'eng\pipelines\arcade\build-warning-configuration.Tests.ps1'
)
$config.Run.PassThru = $true
$config.Output.Verbosity = 'Detailed'
$result = Invoke-Pester -Configuration $config
if ($result.FailedCount -gt 0) { exit 1 }

The Windows XAML suite is the primary test; the build-warning suite is mandatory regression coverage. Do not run a full test suite.

Try-Fix Safety Constraint

The PR adds two tracked test files. try-fix requires EstablishBrokenBaseline.ps1 and mandates a Blocked result without edits when .github/.baseline-state.json contains any NewFiles. Each attempt must honor that boundary, capture the blocked evidence if encountered, restore only with pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore, and continue to the next candidate.


🔬 Code Review — Deep Analysis

Expert PR Evaluation

Verdict: NEEDS_DISCUSSION
Confidence: low

Independent assessment

The submitted change is a broad warning-reduction patch for main: it updates APIScan pipeline classification, switches workload orchestration to Microsoft.Build.NoTargets, modernizes the Android native Gradle configuration, and adds Windows XAML binding metadata and focused Pester regression checks. The approach is internally consistent with reducing diagnostics while preserving the affected build and binding behavior.

Findings

  • Blocking errors: None found.
  • Actionable inline findings: None. inline-findings.json contains a valid empty JSON array.
  • Discussion item: Required-check status could not be established because authenticated GitHub CLI access was unavailable. Under the review policy this prevents an LGTM verdict and caps confidence at low.
  • Validation gaps: Static Pester checks do not replace a Windows XAML compile/runtime pass, and the APIScan isProduction: false classification still needs confirmation in the official 1ES pipeline.

Review reconciliation and risk

No prior error-level review finding was found on the top-level review, inline-comment, or issue-comment surfaces. The Windows resource changes have broad platform scope and can affect resource loading for affected controls, but the review found no new static state, lifecycle latch, subscription, or startup guard defect. The changed TemplateBinding is for a dependency-property margin binding and the corrected visibility bindings now resolve against the model rather than RelativeSource Self.

Reviewer refinement decision

The reviewer supplied no actionable source-code correction. A pr-plus-reviewer candidate therefore cannot improve the submitted patch without inventing changes outside the review findings; it should remain byte-for-byte equivalent to the raw PR candidate, with the unresolved Windows/official-pipeline checks recorded as evidence gaps rather than repaired speculatively.


🛠️ Try-Fix — Analysis & Comparison

Aggregate Try-Fix Results

Candidate 1 — gpt-5.3-codex

Approach: Establish the broken baseline, then seek one mechanism-level alternative distinct from the PR's NoTargets, Gradle/Java, APIScan classification, and Windows XAML metadata mechanisms.

Result: Blocked before editing.

Diff: Empty.

Tests: Not run. The baseline state contained two NewFiles, so the try-fix contract prohibited tracked-file mutation and required immediate restoration.

Analysis: This attempt establishes that the current materialized PR cannot safely enter the implementation phase under the try-fix restoration contract because it adds two tracked Pester files. It does not validate or invalidate any code-level alternative. Inline self-review was clean with 0 findings, and restoration completed with Restored True.

Candidate 2 — gpt-5.6-sol

Intended approach: Replace affected reflection-based Windows XAML bindings with strongly typed template-part assignments in OnApplyTemplate and property-change callbacks.

Prior approaches avoided: Candidate 1's safety-gate-only outcome and the PR's NoTargets, Java/Gradle, APIScan classification, x:DataType, Bindable, and TemplateBinding mechanisms.

Mechanism-level difference: Remove runtime member discovery from affected paths rather than supplying binding metadata or suppressing warnings.

Result: Blocked before editing.

Diff: Empty.

Tests: Not run. Baseline establishment reported 43 reverted files and the same two added Pester suites under NewFiles; the mandatory restoration boundary prohibited mutation.

Analysis: The intended strongly typed template-part approach remains untested, including its converter, two-way update, and template lifecycle behavior. Inline self-review was clean with 0 findings. Restoration completed with Restored True, removed the baseline state, and left no tracked candidate diff.

Aggregate Outcome

Two candidates were attempted in the required model order. Both were safely blocked by the try-fix added-file guard before implementation or test execution. Candidate 2 records a distinct mechanism-level alternative, but neither candidate has empirical validation and neither should be treated as a recommended replacement for the PR.


🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Winner: pr

The raw submitted PR is the single winning candidate. It is the only implemented solution, its current description reports both focused Pester suites passing (10/10), and the expert review found no blocking or actionable code defect. pr-plus-reviewer is byte-for-byte identical because the reviewer supplied no source correction, so selecting that alias would misrepresent a no-op as an improvement.

Approval is not recommended yet. The trusted Gate was SKIPPED, required-check status was unavailable to the expert reviewer, Windows XAML compile/runtime validation remains outstanding, and the APIScan production classification still needs confirmation in the official 1ES pipeline. These are validation gaps rather than evidence that a different candidate is technically better.

Comparative ranking

Rank Candidate Implementation Regression evidence Expert assessment Decision
1 pr Complete 48-file submitted fix PR description reports both focused Pester suites passing 10/10; trusted Gate skipped No blocking errors or actionable inline findings Winner; strongest available implementation, pending required validation
2 pr-plus-reviewer Exactly identical to pr; empty reviewer.patch No separate run because there was no reviewer change; inherits the same evidence and gaps Reviewer had no code correction to apply Sound but offers no improvement and should not displace the submitted PR
3 try-fix-2 Empty; strongly typed template-part approach remained conceptual Not run; blocked by the added-file restoration guard Converter, two-way update, and template lifecycle behavior remain untested Lower than implemented candidates
4 try-fix-1 Empty; stopped at baseline establishment Not run; blocked by the added-file restoration guard No code-level alternative was produced Lowest-information candidate

No candidate failed a regression test. The two try-fix candidates rank below the implemented candidates because they were blocked before editing and testing; their clean self-review results only describe empty diffs.

Why the submitted approach wins

  • It addresses each warning source at its mechanism: a no-target workload project, current Gradle/Java configuration, scoped APIScan artifact classification, and typed/bindable Windows XAML sources.
  • It preserves release-package signing and APIScan execution while limiting isProduction: false to analysis output.
  • It retains converter and two-way binding semantics and changes only the dependency-property-compatible margin binding to TemplateBinding.
  • It includes focused static regression coverage, unlike either try-fix attempt.
  • The expert reviewer found no concrete failure mode, prior error-level review finding, or line-level defect.

Required before approval

  1. Obtain authoritative required-check results; the trusted Gate did not permit approval.
  2. Complete Windows XAML compilation/runtime validation for the globally loaded resource and template changes.
  3. Confirm the non-production APIScan artifact/job classification in the official 1ES pipeline.

No reviewer-authored source patch is recommended. If those checks succeed, the submitted pr candidate should remain the implementation taken forward.


📱 UI Tests — Page,Picker,TableView,ViewBaseTests

Detected UI test categories: Page,Picker,TableView,ViewBaseTests

[!WARNING]
No UI test results were produced for the detected categories. The trusted gate was
skipped before build/test verification, so it does not prove that the PR build is healthy.
The deep UI stage also returned no results; inspect the independent CI checks and retry the
review if those categories still need coverage.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) and removed s/agent-review-in-progress AI review is currently running for this PR labels Sep 21, 2026
@kubaflo

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Tests Failure Analysis

@rmarinho — test-failure analysis for commit 8001281.

Scope CI failures Commit 8001281


🧪 CI Analysis — click to expand
📊 maui-pr

🧪 maui-pr-devicetests

No results available.


🧪 maui-pr-uitests

No results available.


🧭 Follow-up — actions and refresh

Next action: Fix the Windows XAML compile error, then comment /azp run maui-pr-devicetests and /azp run maui-pr-uitests.

Maintainers: comment /review tests to refresh this report.

@kubaflo

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@kubaflo

kubaflo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@rmarinho, is this draft PR ready for review? If it still needs work, please leave it as a draft; otherwise, please mark it ready for review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Expert Review — 0 findings

Reviewed commit 8001281.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 17, 2026
@MauiBot

MauiBot commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

PR Test Gate

@rmarinho — existing-test verification for commit 80012816.

Result SKIPPED Platform Android Commit 80012816


🧪 Gate analysis — click to expand

⚠ Skipped. No runnable PR tests were selected. The fix has not been verified by this gate.

No interpretable test-group summary was produced. No additional test execution is inferred.

PR head: 80012816.

Without-fix baseline: 3a7d7287.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Oct 17, 2026
@kubaflo
kubaflo marked this pull request as ready for review October 23, 2026 22:26
Copilot AI balanced review requested due to automatic review settings October 23, 2026 22:26
@kubaflo

kubaflo commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

/rebase

@github-actions

Copy link
Copy Markdown
Contributor

Unable to rebase this branch automatically. It may have conflicts with its base branch, or the PR author has not allowed maintainer edits. Please rebase manually.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

APIScan artifact classification remains ineffective, and Windows XAML and official-pipeline validation are still outstanding.

1 open issue
What changed in this PR

This PR partially reduces .NET MAUI build and Windows XAML warnings while preserving release signing and existing binding behavior.

Changes:

  • Uses the no-targets SDK for workload orchestration and Java 17 with explicit Gradle assignments.
  • Adds Windows binding metadata and adjusts selected template bindings.
  • Updates APIScan classification, adds Pester regression checks, and documents build expectations.
File Description
src/​Workload/​workloads.csproj Switches to the no-targets SDK.
src/​Workload/​README.md Documents orchestration and signing order.
src/​Core/​src/​Platform/​Windows/​WindowRootView.cs Adds bindable metadata.
src/​Core/​src/​Platform/​Windows/​Styles/​WindowRootViewStyle.xaml Types templates and updates margin binding.
src/​Core/​src/​Platform/​Windows/​Styles/​MauiComboBoxStyle.xaml Declares picker template data type.
src/​Core/​src/​Platform/​Windows/​NavigationViewItemViewModel.cs Adds bindable metadata.
src/​Core/​AndroidNative/​maui/​build.gradle Uses Java 17 and explicit assignments.
src/​Controls/​src/​Core/​TableView/​TableSection.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​TableView/​TableRoot.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Platform/​Windows/​TabbedPage/​TabbedPageStyle.xaml Types navigation-item template.
src/​Controls/​src/​Core/​Platform/​Windows/​Styles/​ShellStyles.xaml Types flyout and search templates.
src/​Controls/​src/​Core/​Platform/​Windows/​Styles/​MauiControlsPageControlStyle.xaml Types the existing page-title binding.
src/​Controls/​src/​Core/​Platform/​Windows/​PageControl.cs Adds bindable metadata.
src/​Controls/​src/​Core/​Platform/​Windows/​CollectionView/​ItemTemplateContext.cs Adds bindable metadata.
src/​Controls/​src/​Core/​Platform/​Windows/​CollectionView/​ItemsViewStyles.xaml Types item and group templates.
src/​Controls/​src/​Core/​Platform/​Windows/​CollectionView/​GroupTemplateContext.cs Adds bindable metadata.
src/​Controls/​src/​Core/​Picker/​Picker.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Page/​Page.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Internals/​AsyncValue.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​TableView/​Windows/​TableViewStyles.xaml Types templates and binds visibility to titles.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​ListView/​Windows/​ListViewStyles.xaml Types cell templates and adjusts visibility bindings.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​ListView/​Windows/​EntryCellTextBox.cs Adds bindable metadata.
src/​Controls/​src/​Core/​Compatibility/​Handlers/​ListView/​Windows/​CellControl.cs Adds bindable metadata.
src/​Controls/​src/​Core/​Cells/​TextCell.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Cells/​SwitchCell.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Cells/​ImageCell.cs Adds Windows bindable metadata.
src/​Controls/​src/​Core/​Cells/​EntryCell.cs Adds Windows bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​TabbedPageStyle.xaml Types legacy tab-header template.
src/​Compatibility/​Core/​src/​Windows/​Resources.xaml Types legacy cells and adjusts visibility bindings.
src/​Compatibility/​Core/​src/​Windows/​PickerStyle.xaml Types legacy picker-header template.
src/​Compatibility/​Core/​src/​Windows/​PageControlStyle.xaml Types the existing legacy title binding.
src/​Compatibility/​Core/​src/​Windows/​PageControl.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​ListViewStyles.xaml Types legacy cells and adjusts visibility bindings.
src/​Compatibility/​Core/​src/​Windows/​FormsTextBox.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​FormsSlider.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​FormsProgressBar.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​FormsPivot.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​FormsComboBox.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​FormsCheckBox.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​FlyoutPageControl.cs Adds metadata to both control classes.
src/​Compatibility/​Core/​src/​Windows/​EntryCellTextBox.cs Adds bindable metadata.
src/​Compatibility/​Core/​src/​Windows/​CellControl.cs Adds bindable metadata.
eng/​pipelines/​arcade/​windows-xaml-trimming.Tests.ps1 Adds template metadata and binding checks.
eng/​pipelines/​arcade/​stage-pack.yml Requests non-production APIScan artifact classification.
eng/​pipelines/​arcade/​stage-api-scan.yml Marks the analysis job non-production.
eng/​pipelines/​arcade/​build-warning-configuration.Tests.ps1 Adds build configuration regression checks.
.github/​workflows/​powershell-script-tests.yml Runs new suites and expands trigger paths.
.github/​docs/​maui-ci-facts.md Documents intended APIScan artifact classification.

Review effort: Balanced

artifactName: APIScanFiles
displayName: Publish APIScanFiles
# Analysis inputs are not the signed packages used for release.
isProduction: false
@kubaflo
kubaflo merged commit d158861 into main Oct 24, 2026
143 of 160 checks passed
@kubaflo
kubaflo deleted the rmarinho-ci-warning-cleanup branch October 24, 2026 10:51
@github-actions github-actions Bot added this to the .NET 10 SR13 milestone Oct 24, 2026
kubaflo added a commit that referenced this pull request Oct 25, 2026
…9622)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

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

### Description of Change

Fix the `maui-pr` regression introduced by #38735
(`d1588611fcec78c856a8eb7b29d583ebecf7b4f1`). Target-branch [build
1647950](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1647950)
fails in Windows Debug/Release builds, Windows Debug/Release unit-test
preparation, and Windows packaging with `MauiComboBoxStyle.xaml(7,42):
WMC0612`, XBF `0x09C4` / `Property Not Found`. The preceding completed
main build,
[1646049](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1646049),
succeeded.

**The fix's full `maui-pr` run succeeded:** [build
1648188](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1648188),
head `c5bfa05b684e6aca9d70171704067cdcb68df2eb`. Native Windows
Debug/Release builds, Windows packaging, both Helix unit-test lanes,
macOS builds/packaging, and the integration stage passed. The run
completed in 2h 17m after the requested `/azp run`.

Restore the pre-cleanup native Windows metadata baseline across Core,
Controls, and the legacy Compatibility backend:

- Remove the newly added native `x:DataType` annotations and
`[Microsoft.UI.Xaml.Data.Bindable]` attributes. Keep all runtime
bindings, converters, two-way updates, public collection/generic APIs,
and `INotifyPropertyChanged` implementations unchanged.
- Preserve #38735's data-context-based `CollapseWhenEmpty` bindings and
equivalent title-bar `TemplateBinding`, plus its unrelated workload,
Android, and APIScan warning fixes.
- Remove source assertions that require the invalid metadata; retain the
three existing binding-behavior checks and document the failure
signatures in the canonical CI guide.

This ports the Windows correction investigated in the now-closed net11.0
PR #39608, rather than repeating its successive failed attempts. That
investigation exposed `WMC0612` on class annotations after removing the
Picker interface annotation, `WMC9999` on overloaded table collections,
`WMC0821` on open generic `AsyncValue<T>`, and invalid generated
`XamlTypeInfo.g.cs`. Restoring the coherent metadata baseline reached a
successful native Windows build there. This PR applies the correction to
**main**, including its legacy Compatibility implementation; it does not
import the unrelated dependency or test-fixture changes from #39608.

Do not fix this by suppressing warnings, editing generated XAML C#, or
changing cross-platform public APIs to satisfy native metadata
generation. Source-only metadata checks cannot substitute for the native
Windows compiler.

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

Addresses the main-branch pipeline regression from #38735. No separate
issue was filed.

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

### Validation

- `/azp run` — accepted; **full `maui-pr` passed**, [build
1648188](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1648188),
tested head `c5bfa05b684e6aca9d70171704067cdcb68df2eb`.
- `pwsh -NoProfile -Command '$result = Invoke-Pester -Path
"eng/pipelines/arcade/windows-xaml-trimming.Tests.ps1" -Output Detailed
-PassThru; if ($result.FailedCount -ne 0 -or $result.PassedCount -ne 3)
{ exit 1 }'` — **passed, 3/3** existing source binding-behavior checks.
- Parsed all 13 changed XAML documents with PowerShell XML parsing —
**passed**.
- Compared all 26 changed C# files with the parent of the regressing
commit — **identical**, confirming metadata-only rollback without
implementation/API edits.
- `git diff --name-only -- '*.cs' -z | xargs -0 dotnet format whitespace
Microsoft.Maui.sln --no-restore --include --verbosity quiet` —
**completed successfully**, with workspace-loading warnings.
- `git diff --check` — **passed**.
- No XCTest or local UI automation was run. Native Windows compilation
was verified remotely, not inferred from source checks.

### Other Checks

This does **not** claim that every PR check is green:

- [Pester
scripts](https://github.com/dotnet/maui/actions/runs/40138145162)
reports **2633 passed, 3 failed**. All three failures are stale
reviewer-model assertions (`CopilotPipeline.Tests.ps1`,
`Review-PR.Tests.ps1`, `Review-Tests.Tests.ps1`) expecting GPT-5.6 Sol.
The exact three failures were reproduced against an isolated, unchanged
`main` checkout; none of their inputs are modified here. They are
outside this Windows metadata fix.
- Separate [device-test build
1648190](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1648190)
failed in the MacCatalyst `Core Tests` Helix work item on
`osx.26.arm64.open` (job `866aed1a-0ae8-48cd-a0f1-033bf3c53d27`). This
is a distinct device-test failure, not the repaired native Windows build
failure; its root cause has not been classified here.
- Separate [UI-test build
1648189](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1648189)
was still running when the requested `maui-pr` observation completed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 30af3f0a-bcc4-4e4a-97a4-bed05029beb0
rolfbjarne added a commit that referenced this pull request Nov 17, 2026
…ning-validation

Conflict in eng/pipelines/arcade/stage-api-scan.yml: main already marks the APIScan job as non-production (#38735), so take main's version. This branch no longer changes that file.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 24, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 80012816 Deployed Sep 21, 2026 by rmarinho via conclusion #1996
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants