Skip to content

Adopt Uno.Sdk tooling (Uno 6.x) for the WinUI 3 gallery - #862

Draft
MartinZikmund wants to merge 4 commits into
CommunityToolkit:mainfrom
MartinZikmund:mzikmund/uno6sdk
Draft

Adopt Uno.Sdk tooling (Uno 6.x) for the WinUI 3 gallery#862
MartinZikmund wants to merge 4 commits into
CommunityToolkit:mainfrom
MartinZikmund:mzikmund/uno6sdk

Conversation

@MartinZikmund

Copy link
Copy Markdown
Contributor

Transitions the toolkit to the Uno.Sdk-based tooling, building the WinUI 3 sample gallery through the unified Uno.Sdk head (desktop + browserwasm + android) while keeping Uno.UI 5.x for UWP / WinUI 2.

Depends on the tooling submodule PR: CommunityToolkit/Tooling-Windows-Submodule#305 (which in turn depends on #304). The submodule pointer here references that branch and will move to the merged commit once #305 lands.

Changes

  • Bump the tooling submodule to the Uno.Sdk-based version.
  • Fix warnings (treated as errors) surfaced by Uno 6.x when the Uno.Sdk head compiles the components for net9.0:
    • CS0618: FocusManager.GetFocusedElement() is obsolete on WinUI 3/Uno — suppress the no-arg fallback used where XamlRoot is unavailable (UWP).
    • IL2087: trim analysis on generic DependencyProperty.Register in the Animations base types (the type is only used as DP metadata).
  • CI: build the Uno.Sdk head for WinUI 3 — add an unosdk entry to the Windows build matrix (excluding winui3 + wasm) and replace the wasm-linux job with uno-linux (browserwasm + desktop). WinUI 2 (UWP) keeps the legacy Uno.UI 5.x wasm head.

Both Uno.Sdk heads (net9.0-desktop and net9.0-browserwasm) build end-to-end against the toolkit components.

🤖 Generated with Claude Code

MartinZikmund and others added 4 commits June 17, 2026 16:15
Bump the tooling submodule to the Uno.Sdk-based version and resolve the
warnings (treated as errors) that the Uno 6.x upgrade surfaces when the
Uno.Sdk gallery head compiles the components for net9.0:

- CS0618: FocusManager.GetFocusedElement() is obsolete on WinUI 3/Uno;
  suppress the no-arg fallback used where XamlRoot is unavailable (UWP).
- IL2087: trim-analysis on generic DependencyProperty.Register in the
  Animations base types; suppress (the type is only used as DP metadata).

The Uno.Sdk head (net9.0-desktop and net9.0-browserwasm) now builds
end-to-end against the toolkit components.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirror the tooling CI's Uno.Sdk handling:
- Windows build matrix: add an `unosdk` entry (WinUI 3), exclude
  winui3+wasm (now covered by the Uno.Sdk head). Install workloads
  directly and build the Uno.Sdk head csproj with dotnet.
- Replace the wasm-linux job with uno-linux: build the Uno.Sdk head
  for browserwasm and desktop instead of the legacy Uno.UI Wasm head.

WinUI 2 (UWP) keeps the legacy Uno.UI 5.x wasm head.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Picks up the MultiTarget split from the tooling submodule, where Arlo's
review replaced the bulk 'desktop' target with the three platforms it
stood for: macos, linux (renamed from linuxgtk) and a new win32. On WinUI
3 all three are served by Uno 6's single net{x}-desktop head; on WinUI 2
they keep the Uno.UI heads. Naming them after platforms rather than
implementation details (GTK, WPF) keeps a component's declaration
meaningful across both WinUI versions.

Every component that declared linuxgtk now declares linux and win32.

The CI matrix drops 'unosdk', which was never a MultiTarget - it existed
only to flip -IncludeUnoSdkHead. It is now an include: flag on the
existing wasm/winui3 job, so matrix.multitarget only ever holds values
the MultiTarget system recognises, and the two generate steps collapse
into one. Two exclusions the split implies are added: wpf is WinUI 2 only
(Uno 6 dropped Uno.UI.Skia.Wpf) and win32 is WinUI 3 only - without them
those jobs would generate a solution containing no components.

Also fixes the uno-linux job, which generated with -MultiTargets wasm and
then built -f net9.0-desktop. Since the head started honouring the
requested MultiTargets it only declares that TFM when a desktop target is
asked for, so the job now requests wasm,linux.

Verified locally: solution generation with -MultiTargets wasm,win32
-IncludeUnoSdkHead resolves the head to net9.0-desktop;net9.0-browserwasm,
and the desktop head builds Release clean (0 warnings, 0 errors) against
all 19 desktop-capable components.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0111vdg6YNSNuoVkGdHyr2eX
Uno 7.0 drops Mac Catalyst, so the macos MultiTarget now maps to the Skia
desktop head on WinUI 3 and to Catalyst only on WinUI 2.

Effect on this repo's packages: the .WinUI variants lose
net9.0-maccatalyst and keep everything else. Consumers building Mac
Catalyst apps resolve the net9.0 asset instead, which is behaviourally
identical - no component here references __MACOS__ or MACCATALYST.

Verified: CommunityToolkit.WinUI.Controls.Segmented with -MultiTargets all
resolves to net9.0-windows10.0.19041, net8.0-windows10.0.19041, net9.0,
net9.0-ios and net9.0-android on WinUI 3 (the published set minus
maccatalyst) and keeps net9.0-maccatalyst on WinUI 2. The Uno.Sdk desktop
head still builds Release clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0111vdg6YNSNuoVkGdHyr2eX
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