Skip to content

fix(ci): skip mc:Ignorable markup in the XAML resource key check - #1765

Open
kazo0 wants to merge 2 commits into
masterfrom
dev/sb/20261028/xaml-keys-ignorable
Open

kazo0 wants to merge 2 commits into
masterfrom
dev/sb/20261028/xaml-keys-ignorable

Conversation

@kazo0

@kazo0 kazo0 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

GitHub Issue (If applicable): N/A (follow-up to #1740, found while testing the 8.0 backport #1764)

PR Type

What kind of change does this PR introduce?

  • Build or CI related changes

Description

check-xaml-resource-keys.ps1 (added in #1740) checks every attribute of a XAML file, including the ones in namespaces the root marks mc:Ignorable. WinUI never evaluates those elements or attributes, so a key referenced only there can't fail on WinUI and shouldn't be reported.

On servicing/8.0 this turned into a false failure: SamplesApp.Shared/Shell.xaml still carries xamarin:Style="{StaticResource NativeDefaultFrame}", an Android/iOS-only style. Master dropped the xamarin: markup with Uno 7, so the check passes here today. This keeps master's script identical to the fixed copy in #1764, so later backports of it apply cleanly, and covers any other ignorable prefix.

The second commit makes the script read WinUI's generic.xaml from the WinAppSDK package SimpleSampleApp actually restored (its project.assets.json), instead of the newest microsoft.windowsappsdk.winui in the NuGet cache. That package only exists from WinAppSDK 1.8, so the check failed on servicing/8.0 (1.7), and a shared cache could check against a WinUI the head doesn't use.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

  • pwsh build/scripts/check-xaml-resource-keys.ps1 passes on master (WinAppSDK.WinUI 2.3.6) and on servicing/8.0 (fix: backport #1729, #1740, #1742 and #1743 to servicing/8.0 #1764, WinAppSDK 1.7.250909003) with this change, and fails with "restore the SimpleSampleApp WinAppSDK head first" when the head isn't restored.
  • Negative check: with Tag="{StaticResource BogusRealKey}" and xamarin:Tag="{StaticResource BogusIgnoredKey}" added to Shell.xaml, the script still fails on BogusRealKey for both heads and ignores BogusIgnoredKey.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PZQ75mhsSKg378DiL3QqWT

- WinUI never evaluates elements or attributes in an ignorable namespace, so a key referenced only there (Shell.xaml's xamarin:Style="{StaticResource NativeDefaultFrame}") is not a WinUI failure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZQ75mhsSKg378DiL3QqWT
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-rock-0cfebe70f-1765.eastus2.azurestaticapps.net

@kazo0
kazo0 enabled auto-merge (squash) October 28, 2026 17:22
- The XAML resource key check took the newest microsoft.windowsappsdk.winui in the NuGet cache
- WinAppSDK only splits WinUI into that package from 1.8; servicing/8.0's 1.7 ships it in microsoft.windowsappsdk, so CI found nothing
- A cache shared with other branches could also check against a WinUI the head doesn't use
- Resolve the package from SimpleSampleApp's project.assets.json, which covers both layouts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PZQ75mhsSKg378DiL3QqWT
@github-actions

Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://salmon-rock-0cfebe70f-1765.eastus2.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant