Skip to content

chore!: Uno Platform 7.0 retarget (SDK, net10.0, Skia mobile port) - #1635

Merged
MartinZikmund merged 86 commits into
mainfrom
dev/mazi/uno7-groundwork
Sep 22, 2026
Merged

MartinZikmund merged 86 commits into
mainfrom
dev/mazi/uno7-groundwork

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: relates to unoplatform/uno-private#2074

PR Type

  • Build or CI related changes
  • Bugfix
  • Refactoring

What is the current behavior?

The toolkit targets Uno Platform 6 (net9.0) and does not build or run against Uno Platform 7.0.

What is the new behavior?

Uno.Toolkit builds and runs on Uno Platform 7.0 (Uno.Sdk.Private 7.0.0-dev.701, net10.0), on top of the Uno 7 builds of Uno.Themes (9.0.0-dev.15) and C# Markup (7.0.0-dev.33).

The full plan, the decisions behind it and what is still open are in specs/uno7-groundwork/progress.md.

Target frameworks and the Skia mobile heads

  • Libraries keep net10.0, net10.0-android, net10.0-ios and net10.0-windows10.0.19041, matching Uno.Themes 9.0. Mac Catalyst is gone.
  • In Uno 6, a Skia Android/iOS head swapped every library's mobile asset for its plain netX.0 build, so Skia users have always run the plain toolkit build. Uno 7 (unoplatform/uno@bc6254848a) stops that swap. The mobile assets are therefore rebuilt to behave like the plain Skia build, and the native-renderer code they used to carry is removed.

Native rendering removal (breaking)

  • NavigationBar uses its XAML template on every platform. NativeFramePresenter, NativeNavigationBarPresenter, the native renderers, NativeDefaultToolkitFrame, the *NativeNavigationBarTemplate keys and the IsNativeStyle frame styles are removed. doc/controls/NavigationBar.md has a migration section.
  • The TabBar, FlipView, Chip and segmented-control styles collapse their mobile: forks onto the arm Skia heads already used.
  • TabBarSelectorBehavior follows the FlipView's ScrollViewer everywhere. ScrollableHelper gets a managed scroll-to-top/bottom, where the mobile path previously threw NotImplementedException.
  • ExtendedSplashScreen uses the Skia splash on Android and iOS, built from UnoSplash.def. Init(Activity) keeps its signature and still hands off to the AndroidX splash screen; this is the one native-only behavior kept, as an OS-level service.
  • SafeArea computes insets from Bounds and VisibleBounds on every Uno target. The removed IsStatusBarTranslucent branch goes, and the Android bounds-race guard stays.

Other Uno 7 fallout

  • BC53 (Uno.UI.Toolkit → Uno.UI.Extras namespaces) and BC26 (DependencyObject is a class).
  • IDependencyObjectStoreProvider → MarkupHelper.SetParent.
  • ShadowContainer renders through SKCanvasElement on Uno targets. SkiaSharp.Views.Uno.WinUI is still built against Uno 5 and stopped the app from starting, so the reference is gone; WinAppSDK keeps SKXamlCanvas.
  • DrawerControl.IsOpen set off the UI thread is marshalled to it. Uno 7 now enforces thread access in composition, as WinUI does.
  • Sample heads: the Android host goes through UnoPlatformHostBuilder, and Hot Design / App MCP are disabled in Debug until they ship Uno 7 builds.
  • CI: the .NET SDK is pinned to 10.0.101, the band uno.check provisions wasm-tools for (NETSDK1147, same fix as Uno.Themes), and the install cache is now keyed on that version.
  • Hot reload: the dev-server loads every library flavor and ignores the build's global properties, so libraries evaluate net10.0 only when UnoIsHotReloadHost is set, and the CI job writes crosstargeting_override.props for desktop. The Debug heads call EnableHotReload(), and HotReloadTestHelper waits for the edited assembly's delta, since Uno 7 also emits a delta for the head's uno.hot-reload.info.
  • iOS trim analyzer: IL2122 is fixed by assembly-qualifying the name; IL2070/IL2075 are suppressed with justification on name-based DP lookups.

Verification

CI: every job on this PR is green, including Packages, all sample builds, and the desktop and hot-reload runtime tests.

Run locally on Windows with the commands the pipeline uses:

Leg Result
Uno.Toolkit-packages.slnf + Uno.Toolkit.RuntimeTests, net10.0-android / net10.0-ios 0 errors, no UNOB0020
Desktop publish: Material, Cupertino, Simple 0 errors
WASM publish: Material, Cupertino 0 errors
Android build: Material, Cupertino 0 errors
Packages (MSBuild, GeneratePackageOnBuild) 0 errors, 8 packages
Desktop runtime tests (Linux, WSLg) 354 of 360 before the last fix; the 6 incremental-loading failures pass after it (re-run with Attempts: 1)
Hot-reload runtime tests (Debug desktop) 48 of 48 after the hot-reload fixes (CI had 39 of 45 failing)
Skia Android runtime tests (API 34 emulator, Release, local harness) 244 of 365; all 121 failures are exact-size assertions broken by rounding at 2.625 density. Every port-sensitive test passes: splash, SafeArea system bars, NavigationBar, ChipGroup #1300, drawer, scroll-to-top

Published assemblies were checked with a metadata reader: nothing references the removed Uno 6 assemblies.

Not verified here: Skia iOS runtime tests, the visual splash handoff on devices, the WinAppSDK sample heads, and the iOS app heads, which need a Mac.

PR Checklist

  • Tested code with current supported SDKs
  • Tested the changes where applicable:
    • WinUI (Skia desktop)
    • iOS
    • Android
    • WASM (build)
  • Updated the documentation as needed (NavigationBar, ExtendedSplashScreen, SafeArea, AGENTS.md)
  • Runtime Tests added or ported (NavigationBar, ScrollableHelper, TabBarItemExtensions, ExtendedSplashScreen, SafeArea)
  • Contains NO breaking changes — breaking changes are described in the BREAKING CHANGE: bodies of the ! commits

🤖 Generated with Claude Code

https://claude.ai/code/session_01SQBL3dpwkP1vsVzy7Kcijc

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 231870 has failed on Uno Toolkit - CI.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 232586 has failed on Uno Toolkit - CI.

Comment thread samples/Directory.Packages.props Resolved
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/uno7-groundwork branch from 9e61145 to a9a613e Compare September 9, 2026 09:54
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 232731 has failed on Uno Toolkit - CI.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 232739 has failed on Uno Toolkit - CI.

MartinZikmund and others added 18 commits September 17, 2026 11:14
BREAKING CHANGE: library target frameworks move from net9.0 to net10.0.
Consuming apps must target .NET 10 or later.

Move every library project from `Uno.Sdk` to `Uno.Sdk.Private`, since no
public `Uno.Sdk` 7.x exists yet (it is repacked by `uno.templates`). The
samples and runtime tests were already on the private SDK.

Library TFMs move net9.0 -> net10.0 to match `NetCurrent`, so libraries and
sample apps no longer straddle two runtime versions.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019vRaBaNK2HnyWeg3TBzEu6
BREAKING CHANGE: the `Uno.UI.Toolkit` xmlns is gone. XAML copied from these
styles must use `using:Uno.UI.Xaml.Controls` for `ElevatedView` and
`using:Uno.UI.Xaml` for `UIElementExtensions.Elevation`.

`Uno.UI.Toolkit` no longer exists: the assembly was renamed to
`Uno.UI.Extras` (shipped inside `Uno.WinUI`) and its types kept natural
namespaces rather than moving as a block, so the old single xmlns splits
in two:

- `ElevatedView` -> `Uno.UI.Xaml.Controls`
- `UIElementExtensions.Elevation` -> `Uno.UI.Xaml`

Remap the 13 XAML files that actually use those two members, drop the
dead `toolkit` xmlns from the 15 that only declared it, and repoint the
runtime-test xmlns map.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019vRaBaNK2HnyWeg3TBzEu6
The `SkiaSharpVersion` override held samples on SkiaSharp 3.119.2, which
NU1605-downgrades against the 4.151.1 that Uno 7.0 requires. Removing the
override lets the SDK pick its own matching version.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019vRaBaNK2HnyWeg3TBzEu6
`DependencyObject` is a class in Uno 7.0 rather than an interface, so the
`#if HAS_UNO class,` half of these constraints is now both redundant and
illegal (CS0450). Plain `where T : DependencyObject` is correct on WinUI
and Uno alike.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019vRaBaNK2HnyWeg3TBzEu6
SkiaSharp 4 obsoletes `DrawImage(SKImage, SKPoint, SKPaint)`, which builds
as an error here. `SKSamplingOptions.Default` keeps the existing sampling.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019vRaBaNK2HnyWeg3TBzEu6
`UserControl.Content` is a non-nullable `UIElement` in Uno 7.0 (WinUI
parity), so assigning the nullable test field trips CS8601. The test sets
the content before the page is constructed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019vRaBaNK2HnyWeg3TBzEu6
Moves both pins from 7.0.0-dev.645 to the latest 7.0 dev build.

- Restores `GetBindingExpression` on `DependencyObject`, clearing the four
  CS1061 errors in CommandExtensions, LoadingView.HotReload and
  TabBar.HotReload that broke the desktop, wasm and hot-reload jobs.
- Introduces no new build errors on any target framework.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
BC53 split the old `Uno.UI.Toolkit` xmlns across two namespaces, but both
halves kept the `toolkit` prefix. `Uno.XamlMerge.Task` merges every style
into one dictionary and requires a prefix to map to exactly one namespace,
so the merge aborted with:

    The XML namespace [toolkit] with the value [using:Uno.UI.Xaml] is
    different than the already defined value [using:Uno.UI.Xaml.Controls]

Keep `toolkit` for `Uno.UI.Xaml.Controls` (`ElevatedView`, 10 files) and
introduce `unoxaml` for `Uno.UI.Xaml` (`UIElementExtensions.Elevation`, the
3 NavigationBar styles).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
Uno 7.0 removes `IDependencyObjectStoreProvider` and `DependencyObjectStore`
from the public surface, breaking the internal `DependencyObject.SetParent`
helper on every target framework.

`Uno.UI.Helpers.MarkupHelper.SetParent(DependencyObject, object)` is the
public replacement. The previous `ReferenceEquals` guard is dropped because
the store's `Parent` setter already no-ops on an unchanged parent.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
Uno.Sdk.Private 7.0 only flows a SkiaSharp views package to the WinAppSDK
head, where `SkiaSharp.Views.WinUI` supplies the `SkiaSharp.Views.Windows`
namespace. On every other target framework the SkiaSharp feature resolves
`SkiaSharp` and `SkiaSharp.Skottie` but no views package, so ShadowContainer
failed to compile:

    error CS0234: The type or namespace name 'Views' does not exist in the
    namespace 'SkiaSharp'
    error CS0246: The type or namespace name 'SKPaintSurfaceEventArgs' could
    not be found

Reference `SkiaSharp.Views.Uno.WinUI` for the non-WinAppSDK targets, which
ships the same namespace for net10.0, mobile and the wasm/skia runtimes.
The version tracks the SkiaSharp group pinned by the SDK.

Verified by publishing the Material desktop sample, which is the path CI
uses and the one that exposed the gap.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
Captures what is verified green, the three remaining blocker groups, the
ordered plan and the open TFM decision, plus the evidence behind each claim.

Notable findings recorded:
- The Uno checkout is stale versus the shipped package; verify against the
  nuspec's pinned commit or the package on disk.
- `SkiaSharp.Views.Uno.WinUI` 4.151.1 is itself Uno 6 built, so the toolkit
  compiles but the host crashes on startup. `ShadowContainer` needs porting to
  `Uno.WinUI.Graphics2DSK`.
- `Uno.WinUI.Markup` and `Uno.Extensions.Markup.WinUI` have no Uno 7 build at
  all, which gates both markup packages.
- Mobile TFMs remain first class in Uno 7, so dropping them is a product
  decision rather than a forced consequence.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
Three corrections from the retarget worth not repeating:

- MSBuild resolves `msbuild-sdks` from the `global.json` nearest the entry
  point, so a solution build and CI's per-head publish can use different Uno
  versions. Run the literal pipeline command.
- The local Uno checkout lagged the consumed package by five weeks; read the
  shipped assembly or the nuspec's pinned commit instead.
- A clean build proved nothing twice over: an xmlns pointing at a namespace
  with no matching type still compiles, and a dependency that restores can
  still bind assemblies the new major version removed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
The error log only covers the 8 library projects, so the runtime-test project
and the sample heads are unverified, and skipped dependants produce no
diagnostic at all. Roslyn also stops binding method bodies once declaration
errors exist, so record the Uno 6 APIs that are absent from every Uno 7
assembly and will surface next: IsStatusBarTranslucent, SmoothScrollToIndex
and SKXamlCanvas.Opaque.

Also name $(UnoCSharpMarkupVersion) as the override lever for the markup
packages, which have no Uno 7 build at all.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
The new spec files broke both Docs Validations jobs.

- Add a language to the fenced stack trace (MD040).
- Add the recurring domain terms to the cspell dictionary: commitsar,
  HarfBuzz, retarget, retargeted, TFMs, UXAML.
- Reword the rest rather than widening the dictionary for one-off spellings.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
BREAKING CHANGE: `net10.0-maccatalyst` is no longer an available target.
Uno 7.0 ships no MacCatalyst support.

Uno 7.0 has no `Uno.Common.MacCatalyst.targets` and no `maccatalyst` folder
under `buildTransitive`, so the SDK no longer recognises the platform — and
therefore no longer excludes `Platforms/MacCatalyst/**` from the other target
frameworks. The MacCatalyst entry point started compiling into every head:

    Platforms/MacCatalyst/Main.maccatalyst.cs(1,7): error CS0246: The type or
    namespace name 'UIKit' could not be found
    [SimpleSampleApp.csproj::TargetFramework=net10.0-browserwasm]

Delete the three dead `Platforms/MacCatalyst` folders — no sample head has
listed a maccatalyst TFM — and remove the `maccatalyst` option from
`tfm-common-winui.props` and its hint in the crosstargeting sample, since
selecting it could only produce a target framework Uno 7 cannot build.

Verified with the CI WebAssembly command: the UIKit error is gone and the
Material head now fails only on the two known Uno.Themes errors that the
retargeted Themes package resolves.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
- `Uno.ShowMeTheXAML` has no Uno 7 build at any version, so it crashes the
  Themes sample apps at startup exactly as SkiaSharp.Views does here.
- The XAML generator still types a ControlTemplate builder as returning the
  native view type on mobile, which Uno 7 removed (CS0407). It reproduces in
  Uno.Simple.WinUI only, so it is template-shape specific.

Both were found on the sibling uno.themes PR and neither is fixable
downstream.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TgSByQzKDng9vt79kCkRTC
- Uno.Sdk.Private and Uno.WinUI.DevServer move to 7.0.0-dev.701, the build
  Uno.Themes 9.0.0-dev.15 is compiled against.
- Uno.Themes moves to 9.0.0-dev.15, the first line retargeted to Uno 7. The
  8.0 line binds Uno.dll and Uno.UI.Toolkit, which Uno 7 no longer ships, and
  surfaces as CS0012 (CoreDispatcher, Color) in every sample head.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01SQBL3dpwkP1vsVzy7Kcijc
MartinZikmund and others added 6 commits September 22, 2026 13:22
- Align `where T : DependencyObject` on `FindChild` and `GetFirstParent` with
  the rest of the file, which already indents the clause one level deeper

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Handle the IO/assembly-load exceptions the Resizetizer definition read can
  raise as a warning, and keep a generic catch as the last-resort fallback so
  startup still degrades to "no splash screen" rather than crashing

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…to-top

- Replace the exact `VerticalOffset == 0` float comparison with a tolerance, so
  a smooth scroll that settles just shy of zero does not time the test out

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- `toolkit` reads as Uno Toolkit inside the Uno Toolkit repo, while it actually
  points at Uno's own `Uno.UI.Xaml.Controls` (ex-`Uno.UI.Toolkit`)
- Covers the 10 style dictionaries and the runtime-test XamlHelper xmlns map

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Uno's XAML generator reports `UniversalApiContract` present up to major 14 and
  the WinAppSDK min target (10.0.19041) is contract 10, so `contract7Present` and
  `contract8Present` always apply and `contract7NotPresent` never does: inline
  the former and delete the latter's branches
- Remove the `contract*Present`/`contract*NotPresent` and `todo` xmlns
  declarations left with no reference, plus the `mc:Ignorable` entries and
  `xmlns:mc` that only existed to carry them

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 234962 has failed on Uno Toolkit - CI.

…tion

`src/Uno.Toolkit.UITest/` was removed in #1544 but its solution entry survived,
so every `dotnet restore`/`build` against `src/Uno.Toolkit.sln` failed with
MSB3202 before reaching a single project. CI never caught it because the
pipeline builds the sample heads directly.

- Remove the `Uno.Toolkit.UITest` project declaration and its 100 orphaned
  `ProjectConfigurationPlatforms` rows

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
- Wrap the reviewer handles in backticks so cSpell's inline-code pattern skips
  them, rather than adding usernames to the shared dictionary
- `crosstarget` -> `cross-target`

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

1 similar comment
@github-actions

Copy link
Copy Markdown

The pin down to `10.0.101` worked around uno.check provisioning `wasm-tools`
from a manifest that set `mono.toolchain.current` *below* the running SDK, so
the resolver asked for a `Microsoft.NET.Runtime.MonoTargets.Sdk` that was never
installed and every `net10.0-ios` library build failed `NETSDK1147`.

That root cause is gone: uno.check's manifest moved from `WASMTOOLS_VERSION`
`10.0.101/10.0.100` (`1cde21cd`, Dec 2025) to `10.0.108/10.0.100` (`c748387e`,
Aug 2026), which is well above `10.0.102`.

- Restore `DotNetVersion` to `10.0.102` on the Linux, macOS and Windows workload
  templates, matching `main`
- Replace the pin's rationale with the standing constraint, so the hazard is
  documented without holding the SDK back

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

Reverts 562c143. Raising the SDK to 10.0.102 failed the Packages job with the
same NETSDK1147 (build 234972), so the pin is structural, not incidental.

uno.check ships its manifest as an embedded resource, so the live manifest in
unoplatform/uno.check does not apply. 1.34.1 embeds WASMTOOLS_VERSION
'10.0.101/10.0.100', and provisioning wasm-tools installs
mono.toolchain.current 10.0.101 -- below SDK 10.0.102, which is what breaks the
net10.0-ios library builds.

- Restore DotNetVersion to 10.0.101 on all three workload templates
- Replace the rationale with the verified mechanism, so the next reader does not
  have to re-derive it from the tool's embedded resources

Raising the SDK requires raising uno.check with it; no released version does
both cleanly, so that stays a tracked follow-up.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

@mergify

mergify Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@MartinZikmund
MartinZikmund merged commit 55eb0c1 into main Sep 22, 2026
24 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/uno7-groundwork branch September 22, 2026 13:38
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.

5 participants