Skip to content

Migrate to Uno.Sdk and Uno Platform 7.0 - #317

Open
MartinZikmund wants to merge 9 commits into
CommunityToolkit:user/sergiopedri/dotnet-10-upgradefrom
MartinZikmund:mzikmund/uno7-sdk
Open

MartinZikmund wants to merge 9 commits into
CommunityToolkit:user/sergiopedri/dotnet-10-upgradefrom
MartinZikmund:mzikmund/uno7-sdk

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Recreates #305 (Migrate to Uno.Sdk) on top of #315 (.NET 10 SDK + build tooling), and targets Uno Platform 7.0 for the WinUI 3 flavor.

Based on #315 (this PR targets its branch, so the diff only shows the changes below). Supersedes #305.

What's in here

1. Uno.Sdk migration (from #305)

Squashed recreation of #305's final state onto #315 - see #305 for the full commit history. In short:

  • New unified Uno.Sdk single-project gallery heads (ProjectHeads/AllComponents/Uno, ProjectHeads/SingleComponent/Uno) serving win32, linux, macos, wasm, android and ios on WinUI 3.
  • win32, linux and macos are first-class MultiTargets, all served by the single Skia -desktop TFM.
  • Scripts and CI derive the Uno.Sdk head from -MultiTargets / -WinUIMajorVersion.
  • WinUI 2 keeps Uno 5.x (Uno.UI) and its classic heads.

Only conflict against #315 was global.json.

2. Uno Platform 7.0 for WinUI 3

  • Uno.Sdk 7.0.0-dev.51, Uno.WinUI / Uno.WinUI.Lottie 7.0.0-dev.1656 (the version that Uno.Sdk pins), Uno.Fonts.Fluent 2.9.4 (what Uno.WinUI 7 depends on).
  • Uno 7 ships net10.0 / net11.0 only, so WinUI 3 Uno targets move to .NET 10 (net10.0, net10.0-desktop, net10.0-browserwasm, net10.0-android, net10.0-ios).
  • New UnoDotNetTargetFramework in AvailableTargetFrameworks.props picks net10.0 for WinUI 3 and keeps net9.0 for WinUI 2. Uno.UI (WinUI 2) stays on Uno 5.x / .NET 9.
  • Mac Catalyst stays out of the WinUI 3 package surface only (Uno 7 removed it). WinUI 2 still builds -maccatalyst.
  • NET10_0_OR_GREATER added to DefinedConstants.props.
  • MSBuild.Sdk.Extras workaround: Extras infers net10.0 as .NETFramework,Version=v10.0. Its TFM check only reads the first digit (Compatibility with .NET 10 TFMs novotnyllc/MSBuildSdkExtras#305, still open). Library.props now sets TargetFrameworkIdentifier for .NET TFMs.
  • Hot Design and App MCP are disabled on the Uno heads (UnoDisableHotDesign / UnoDisableMCPSupport). The versions pinned by Uno.Sdk 7.0.0-dev.51 still reference pre-7.0 Uno assemblies, which causes UNOB0023 at build and a hang at startup (7.0-dev: HotDesign, Toolkit and CommunityToolkit packages reference 'Uno'/'Uno.UI.Toolkit', which 7.0 no longer ships unoplatform/uno#24297). There's a TODO to re-enable them.
  • The classic Wasm head imports WinUI.TargetVersion.props before the TFM props.
  • ToolkitDocumentationRenderer.xaml sets Background on MarkdownTextBlock only on Windows. On Uno it's a TextBlock, which has no Background in WinUI, and Uno 7 removed it for parity.

3. RichTextBlock lights up on Uno 7

Uno 7 ships a full port of WinUI's RichTextBlock (unoplatform/uno#23731):

  • Sample source-code viewer: on Uno WinUI 3 it now uses a RichTextBlock with ColorCode syntax highlighting, like the Windows heads, instead of a plain TextBlock. ColorCode.WinUI is Windows-only, so Polyfills/ColorCode/RichTextBlockFormatter.cs ports its formatter onto ColorCode.Core. Uno WinUI 2 keeps the TextBlock fallback.
  • Docs renderer: on Uno WinUI 3, MarkdownTextBlock can now wrap the Labs MarkdownTextBlock (RichTextBlock-based), themed to match the Windows typography. Links open through the same handler as on Windows. This is opt-in through LabsMarkdownTextBlockVersion, because Labs doesn't ship Uno targets yet (CommunityToolkit/Labs-Windows draft linked below). Until then, Uno shows the plain-text fallback.

Validation

Against CommunityToolkit/Windows main + #862 + the companion changes (draft PR linked below), on Windows with .NET SDK 10.0.400:

  • GenerateAllSolution.ps1 -MultiTargets win32 -WinUIMajorVersion 3 generated all project references. The final SlnGen step can't launch here because no Visual Studio is found.
  • CommunityToolkit.App.Uno for net10.0-desktop: 0 errors. 22 components plus samples compile against Uno 7.0.0-dev.1656.
  • The gallery runs on Uno 7 Desktop (Win32 / Skia): shell, navigation, search and sample pages work. The sample code viewer shows syntax-highlighted XAML/C# in a RichTextBlock. A Debug launch takes ~30-60 s before the window appears.
  • For that local run, Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI came from a local pack of feat: Update to Uno Platform 7.0 unoplatform/Uno.XamlBehaviors#36. No Uno 7 build of it is published yet (see below).

Consumer (CommunityToolkit/Windows) changes needed

Draft: CommunityToolkit/Windows#880

Upstream blockers and fixes

Follow-ups

Once RichEditBox lands in Uno:

  • RichSuggestBox (components/RichSuggestBox, currently uwp;wasdk): enable wasm;win32;linux;macos;ios;android on WinUI 3.

RichTextBlock-based:

  • Labs MarkdownTextBlock on Uno (CommunityToolkit/Labs-Windows draft, in progress). Once it's published, set LabsMarkdownTextBlockVersion in App.Head.Uno.WinUI.Dependencies.props.
  • Consider moving the Windows heads from the 7.x CommunityToolkit.WinUI.UI.Controls.Markdown to the Labs MarkdownTextBlock as well. That means replacing the 7.x win:Style with MarkdownThemes. Labs' UWP package has no uap10.0 target.

Housekeeping:

  • Bump Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI once Uno.XamlBehaviors#36 is published.
  • Re-enable Hot Design / App MCP once Uno 7-compatible builds ship.
  • Drop the Extras TargetFrameworkIdentifier workaround once MSBuildSdkExtras#305 is fixed.
  • Bump to Uno 7.0 stable once released.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC

MartinZikmund and others added 8 commits October 9, 2026 11:01
Squashed recreation of CommunityToolkit#305 on top of CommunityToolkit#315.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Uno.Sdk 7.0.0-dev.51 / Uno.WinUI 7.0.0-dev.1656, which require .NET 10.
WinUI 2 (Uno.UI 5.x) stays on .NET 9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
The versions pinned by Uno.Sdk 7.0.0-dev still reference pre-7.0 Uno assemblies (unoplatform/uno#24297).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
TextBlock has no Background in WinUI, and Uno 7 removed it for parity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Uno 7 supports RichTextBlock, so the Uno WinUI 3 heads get the same ColorCode-highlighted
source viewer as Windows. ColorCode.WinUI is Windows-only, so its formatter is ported onto ColorCode.Core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Uno 7 supports RichTextBlock, so the Uno WinUI 3 heads can use the Labs MarkdownTextBlock
instead of showing raw Markdown. Opt-in through LabsMarkdownTextBlockVersion until Labs
publishes a build with Uno targets. Links now open through the same handler as on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Copilot AI balanced review requested due to automatic review settings October 9, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

FontWeights lives in Microsoft.UI.Text on WinUI 3, and the Labs default inline code size (10) is too small next to 14px body text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
@MartinZikmund MartinZikmund mentioned this pull request Oct 10, 2026
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.

2 participants