Skip to content

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

Closed

Description

@MartinZikmund

Current behavior 🐛

A packaged (MSIX) Uno WinAppSDK app ships the entire Windows App SDK runtime inside its package: Microsoft.ui.xaml.dll, DWriteCore, dwmcorei.dll, the WebView2 bits, .mui files for 86 languages, and so on. A plain WinUI 3 app from the Microsoft template doesn't. It declares <PackageDependency Name="Microsoft.WindowsAppRuntime.1.7" …/> instead, and the Store (or App Installer) installs that shared framework package, which most machines already have.

Blank apps, x64, template defaults: plain WinUI is 28.8 MB installed / 48 files, blank Uno (dotnet new unoapp -preset blank -platforms windows) is 104.1 MB / 377 files. Both bundle .NET (SelfContained=true in the pubxml); the difference is WindowsAppSDKSelfContained.

It comes from src/Uno.Sdk/targets/Uno.SingleProject.WinAppSdk.targets:

<PropertyGroup Condition=" '$(IsUnoHead)' == 'true' ">
  <!-- Bundles the WinAppSDK binaries -->
  <WindowsAppSDKSelfContained Condition="$(WindowsAppSDKSelfContained) == ''">true</WindowsAppSDKSelfContained>
</PropertyGroup>

It's applied regardless of WindowsPackageType. Bundling makes sense for unpackaged apps, which otherwise need the runtime installer. For MSIX it only adds size, and every architecture in a bundle carries its own copy. In a real app (trimmed, x64) it's 129.6 MB installed vs 70.0 MB with WindowsAppSDKSelfContained=false, and the Store listing shows the installed size.

Expected behavior 🎯

MSIX heads keep the Windows App SDK default (framework-dependent), and only unpackaged heads (WindowsPackageType=None) default to bundling it.

How to reproduce it (as minimally and precisely as possible) 🔬

  1. dotnet new unoapp -preset blank -platforms windows and dotnet new winui (or the VS WinUI template), both pinned to the same Microsoft.WindowsAppSDK.
  2. Build both MSIX packages: msbuild -restore /p:Configuration=Release /p:Platform=x64 /p:GenerateAppxPackageOnBuild=true (plus /p:TargetFramework=net10.0-windows10.0.26100 for Uno).
  3. Compare them. The WinUI AppxManifest.xml has the Microsoft.WindowsAppRuntime.1.7 PackageDependency; the Uno one has none and carries the runtime instead.

Workaround 🛠️

<WindowsAppSDKSelfContained>false</WindowsAppSDKSelfContained> in the app project. Verified: the package depends on Microsoft.WindowsAppRuntime.1.7, installs, and runs.

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

Windows App SDK

Uno.Sdk version (and other relevant versions) 📦

Uno.Sdk 6.6.0-dev.196; the same default is on master as of 2026-09-21. Microsoft.WindowsAppSDK 1.7.250909003, .NET SDK 10.0.401.

IDE version 🧑‍💻

Command-line MSBuild (Visual Studio 18 Insiders build tools); not IDE-specific.

Anything else we need to know? 💬

Changing the default would affect anyone sideloading an MSIX onto machines without the runtime, so it probably needs a release note (or the default could follow WindowsPackageType only in a major version).

Activity

  1. added
    kind/enhancement
    triage/untriaged
    area/sdk
    on Sep 21, 2026
  2. added
    7.1
    on Oct 14, 2026
  3. removed
    7.1
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/sdkkind/enhancementtriage/untriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions