Skip to content

Weird app size issue with metapackage #5438

@dotMorten

Description

@dotMorten

Describe the bug

When I use the WinUI package, I get a larger app than using the entire winappsdk.

Steps to reproduce the bug

  1. Create a new WinUI app using the project template.
  2. Reference the latest 1.8exp2 metapackage <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.250515001-experimental2" />
  3. Compile and run the app, and notice the bin folder is about 244mb
  4. Replace the package reference with the WinUI specific one <PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="1.8.250507002-experimental" />
  5. Repeat step 3, but notice the output is now 355mb, even though I'm referencing less.
  6. Add the package <PackageReference Include="Microsoft.WindowsAppSDK.Packages" Version="1.8.250515001-experimental2" />
  7. Repeat step 3, but notice the app output now is back down to 244mb. It seems like this package is somehow responsible for not deploying unnecessary stuff.

Expected behavior

App should be smallest with only the WinUI package referenced.

Screenshots

No response

NuGet package version

Windows App SDK 1.8 Experimental 2: 1.8.250515001-experimental2

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 24H2 (22621, October 2024 Update)

IDE

Visual Studio 2022

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions