Skip to content

fix(sdk)!: Bundle WinAppSDK only in unpackaged heads - #26106

Merged
MartinZikmund merged 3 commits into
masterfrom
dev/mazi/winappsdk-framework-dependent
Nov 7, 2026
Merged

MartinZikmund merged 3 commits into
masterfrom
dev/mazi/winappsdk-framework-dependent

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #24578

PR Type:

🐞 Bugfix

What changed? 🚀

A packaged Windows (WinAppSDK) head bundles the whole Windows App SDK in its MSIX, because the Uno.Sdk sets WindowsAppSDKSelfContained to true for every head. A plain WinUI app from Microsoft's template doesn't: its MSIX declares the Windows App Runtime as a framework dependency. In a blank-app publish that's a difference of about 75 MB (141.05 MB against 66.35 MB on native WinUI, 330 files against 49).

The default now applies only to unpackaged heads (WindowsPackageType None), which have no such dependency and need the runtime with them. An MSIX head gets the Windows App SDK's own default. An explicit WindowsAppSDKSelfContained still wins in both directions. The block moved below the place that works out WindowsPackageType, because it has to read the result.

Breaking change. A sideloaded MSIX now needs the Windows App Runtime on the target machine, or <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> in the project. The Store installs the dependency by itself. The migration guide covers this.

SamplesApp changes too. The WinAppSDK lane's MSIX (master build 243954) has no package dependencies today, so it bundles the runtime. It becomes framework-dependent with this PR. The lane already installs Windows App Runtime 2.4, which matches SamplesApp's Microsoft.WindowsAppSDK 2.4.0, so it should keep working. That lane is also the first real run of a framework-dependent app with this change.

Validation.

  • Runtime (MSBuild evaluation): new Given_UnoSdkWinAppSdkSelfContained, covering MSIX, unpackaged, an appx manifest with no explicit type, explicit values both ways, and libraries. Before the fix, the two MSIX default cases failed and the other 6 passed. With it, all 68 Given_UnoSdk* tests pass.
  • Runtime (real publish): a blank unoapp -preset blank -platforms windows with Uno.Sdk 7.0.0-dev.161, patched with this change plus the fixes for SkiaRenderer and the CoreLogging pin, publishes with none of the Windows App SDK binaries (no Microsoft.ui.xaml.dll), the same as native WinUI.
  • Not validated locally: I didn't launch a framework-dependent app or install a sideloaded package, on this machine or a clean one. I also didn't check Visual Studio F5 or dotnet run against a machine that lacks the matching runtime.

PR Checklist ✅

A sideloaded MSIX needs the Windows App Runtime on the target machine, or WindowsAppSDKSelfContained set to true. See the migration guide change in this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TXMNtyBVZWdemP5ouF7UUA

MartinZikmund and others added 2 commits November 5, 2026 15:41
An MSIX can declare the Windows App Runtime as a framework dependency, so bundling it added about 75 MB to every packaged head. Unpackaged heads have no such dependency and keep bundling.

BREAKING CHANGE: a sideloaded MSIX now needs the Windows App Runtime on the target machine, or WindowsAppSDKSelfContained set to true.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TXMNtyBVZWdemP5ouF7UUA
Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:45
@github-actions github-actions Bot added area/code-generation Categorizes an issue or PR as relevant to code generation kind/documentation labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 18s —— View job


Review of #26106

Verdict: ship, with one nit.

  • Blocking: 0
  • Nits: 1 (inline)

What I checked

  • Ordering: I read Uno.SingleProject.WinAppSdk.targets. The new default block now sits after WindowsPackageType is resolved (explicit value, then Package.appxmanifest, then None), so the != 'MSIX' condition sees the final value. The $(WindowsAppSDKSelfContained) == '' guard keeps an explicit true or false winning in both directions.
  • Other consumers: nothing else in src reads WindowsAppSDKSelfContained, so moving the block has no ordering side effects.
  • Docs and breaking change: the migration-guide row states the new default, the sideload requirement and the opt-out. The fix(sdk)!: title and ! marker match Conventional Commits.
  • Tests: Given_UnoSdkWinAppSdkSelfContained covers MSIX, unpackaged, an appx manifest with no explicit type, explicit values both ways, and libraries. None of the tests is skipped or ignored.

Not verified. I read the diff and the targets file only. I didn't build or run anything. As the PR description says, no framework-dependent app has been launched yet. The SamplesApp WinAppSDK CI lane will be the first real run, so watch that lane. Check also that the runner's Windows App Runtime version (2.4) matches SamplesApp's Microsoft.WindowsAppSDK 2.4.0 package.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The breaking MSIX deployment-default change has evaluation and publish evidence but lacks Windows validation of framework-dependent SamplesApp installation, startup, and sideload/F5 behavior.

No open issues 🎉

What changed in this PR

Addresses #24578 by changing Uno.Sdk’s Windows App SDK bundling default: packaged MSIX heads use the shared Windows App Runtime, reducing package size, while unpackaged heads continue bundling it.

Changes:

  • Applies the bundling default after resolving WindowsPackageType, preserving explicit WindowsAppSDKSelfContained values.
  • Adds MSBuild evaluation tests for packaged and unpackaged heads, manifest detection, explicit overrides, and libraries.
  • Documents the breaking change and migration options for sideloaded MSIX packages.
File Description
src/​Uno.Sdk/​targets/​Uno.SingleProject.WinAppSdk.targets Excludes MSIX heads from default Windows App SDK bundling.
src/​SourceGenerators/​Uno.UI.Tasks.Tests/​Given_UnoSdkWinAppSdkSelfContained.cs Tests bundling defaults and explicit overrides across project configurations.
doc/​articles/​migrating-to-uno-7.md Explains runtime prerequisites and how to retain self-contained MSIX deployment.

Review effort: Balanced

@unodevops

Copy link
Copy Markdown
Contributor

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

@unodevops

Copy link
Copy Markdown
Contributor

@MartinZikmund

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

…framework-dependent

# Conflicts:
#	doc/articles/migrating-to-uno-7.md

Co-authored-by: MartinZikmund <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 11:51

Copilot AI commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the conflict with master and pushed merge commit 85c7b3748. The migration guide retains both the Windows App SDK migration note and the updated Lottie entry.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ MartinZikmund
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@MartinZikmund
MartinZikmund merged commit 1f84af6 into master Nov 7, 2026
16 of 22 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/winappsdk-framework-dependent branch November 7, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The breaking deployment-default change has evaluation and publish evidence, but framework-dependent SamplesApp installation and launch remain unconfirmed in WinAppSDK CI and on a clean machine with the matching runtime.

No open issues 🎉

Review effort: Balanced

@unodevops

Copy link
Copy Markdown
Contributor

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

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.

Packaged (MSIX) WinAppSDK heads bundle the whole Windows App SDK by default

5 participants