Skip to content

SparseApp (Unpackaged + Self-contained WinUI3) cannot locate module-specific PRI (AssemblyName.pri) #10856

@lei9444

Description

@lei9444

Describe the bug

When running a WinUI 3 SparseApp in unpackaged + self-contained mode, the application fails to locate the module-specific PRI file (PackageName.pri).

Observed behavior:
The runtime cannot find AssemblyName.pri.
Changing ProjectPriFileName to resources.pri works.

The relevant code might be here: when the app is attached with an identity (SparseApp), only resources.pri is loaded by default.

Image

Why is this important?

We have multiple WinUI 3 apps whose EXEs are output to the same folder. In this scenario, they cannot share the same resources.pri when using SparseApp, because each app needs its own module-specific PRI to avoid conflicts in the shared output directory.

Steps to reproduce the bug

microsoft/PowerToys#42762

  1. Build PowerToys settings
  2. Build Sparse App
  3. install Sparse App
  4. start PowerToys settings UI with Sparse App

Actual behavior

No response

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions