Skip to content

fix(sdk): Report Lottie XAML on WinAppSDK without its package - #25987

Merged
MartinZikmund merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/winappsdk-lottie
Nov 6, 2026
Merged

MartinZikmund merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/winappsdk-lottie

Conversation

@ramezgerges

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #25449

PR Type:

🐞 Bugfix

What changed? 🚀

Lottie is built into Uno.WinUI, so the Uno Platform targets need no package for LottieVisualSource. On Windows (WinAppSDK) the type comes from CommunityToolkit.WinUI.Lottie, which the Uno.Sdk doesn't reference. A single-project app whose XAML uses Lottie builds on desktop, WebAssembly and mobile, then fails on the Windows head with an error that doesn't name the missing package:

MainPage.xaml(6,4): XamlCompiler error WMC0001: Unknown type 'LottieVisualSource' in XML namespace 'using:CommunityToolkit.WinUI.Lottie'

(reproduced with the issue's project on Uno.Sdk 7.0.0-dev.130)

The Windows build now also reports UNOB0034 on each XAML file that declares using:CommunityToolkit.WinUI.Lottie when no reference to that package resolves:

MainPage.xaml : warning UNOB0034: This XAML uses the CommunityToolkit.WinUI.Lottie namespace, which on WinAppSDK (net10.0-windows10.0.26100) comes from the CommunityToolkit.WinUI.Lottie NuGet package. Lottie is built into Uno Platform on the other targets, but not on Windows: add a PackageReference to CommunityToolkit.WinUI.Lottie for the Windows target framework.
  • It runs on the Windows target only, before MarkupCompilePass1. It checks the resolved references (ReferencePath), so a package referenced directly, transitively or through a project reference counts.
  • It's a warning, not an error. A page can declare the namespace without using a Lottie type, and that builds today. When a Lottie type is used, WMC0001 still fails the build, with UNOB0034 next to it.
  • The Lottie Uno Feature stays removed and ignored (cc5a349). Making it add the package on Windows was considered and dropped. So was referencing the package implicitly on every Windows head, which costs ~3.8 MB per app per architecture (Lottie + Win2D).

Docs: UNOB0034 in the build error codes, the Windows PackageReference snippet in the Lottie article, and a link from the 7.0 migration guide's Lottie row.

Validation

  • Unit tests (Uno.UI.Tasks.Tests): new Given_UnoSdkLottieWinAppSdk, 4 cases. It warns for Lottie XAML on Windows without the package. It doesn't warn when the package is referenced, when the XAML doesn't use Lottie, or on desktop. The warning case fails without the target.
  • End to end, with the Uno.Sdk packed locally and the issue's project:
    • Windows without the package: WMC0001 plus UNOB0034 on MainPage.xaml.
    • Windows with the package: builds, no warning.
    • Desktop: builds, no warning.
  • Runtime check on the package itself: with CommunityToolkit.WinUI.Lottie 8.2.250604 referenced, a Lottie animation renders on the Sdk's WinAppSDK 2.5.1 (Win2D 1.0.5.1).

https://aka.platform.uno/UNOB0034 (the warning's help link) still needs to be created.

PR Checklist ✅

🤖 Generated with Claude Code

@github-actions github-actions Bot added area/code-generation Categorizes an issue or PR as relevant to code generation kind/documentation labels Nov 3, 2026
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@ramezgerges
ramezgerges force-pushed the dev/rara/winappsdk-lottie branch from 389e612 to 5210ad3 Compare November 5, 2026 17:54
WinAppSDK takes LottieVisualSource from CommunityToolkit.WinUI.Lottie,
which nothing references, so XAML that builds on the Uno Platform
targets failed on the Windows head with only WMC0001. UNOB0034 now
names the XAML file and the package to reference. It's a warning: a
page can declare the namespace without using any Lottie type.

Fixes unoplatform#25449

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit be560d9 into unoplatform:master Nov 6, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/code-generation Categorizes an issue or PR as relevant to code generation kind/documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows (WinAppSDK) head fails with WMC0001 on LottieVisualSource: Uno.Sdk 7.0 ignores the Lottie feature and adds no Lottie package there

4 participants