Repository navigation
fix(sdk)!: Bundle WinAppSDK only in unpackaged heads - #26106
Conversation
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
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNtyBVZWdemP5ouF7UUA
|
Claude finished @MartinZikmund's task in 18s —— View job Review of #26106Verdict: ship, with one nit.
What I checked
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 |
There was a problem hiding this comment.
🔵 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 explicitWindowsAppSDKSelfContainedvalues. - 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
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-26106/docs/index.html |
|
@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]>
Resolved the conflict with |
|
|
There was a problem hiding this comment.
🔵 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
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
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
WindowsAppSDKSelfContainedtotruefor 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 (
WindowsPackageTypeNone), which have no such dependency and need the runtime with them. An MSIX head gets the Windows App SDK's own default. An explicitWindowsAppSDKSelfContainedstill wins in both directions. The block moved below the place that works outWindowsPackageType, 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.WindowsAppSDK2.4.0, so it should keep working. That lane is also the first real run of a framework-dependent app with this change.Validation.
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 68Given_UnoSdk*tests pass.unoapp -preset blank -platforms windowswith Uno.Sdk7.0.0-dev.161, patched with this change plus the fixes forSkiaRendererand theCoreLoggingpin, publishes with none of the Windows App SDK binaries (noMicrosoft.ui.xaml.dll), the same as native WinUI.dotnet runagainst a machine that lacks the matching runtime.PR Checklist ✅
Screenshots Compare Test Runresults.: not applicableA sideloaded MSIX needs the Windows App Runtime on the target machine, or
WindowsAppSDKSelfContainedset totrue. See the migration guide change in this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNtyBVZWdemP5ouF7UUA