Skip to content

windows-reactor-setup replace framework-dependent resources.pri#4562

Open
riverar wants to merge 1 commit into
masterfrom
rafael/remove-winui-pri
Open

windows-reactor-setup replace framework-dependent resources.pri#4562
riverar wants to merge 1 commit into
masterfrom
rafael/remove-winui-pri

Conversation

@riverar

@riverar riverar commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

windows-reactor-setup now embeds a dummy resources.pri instead of staging it from the Microsoft.WindowsAppSDK.InteractiveExperiences NuGet package, reducing our on-disk footprint by ~100KiB and reducing our build time footprint by ~94MiB.

The file must remain in place until microsoft/WindowsAppSDK#5828 is fixed.

Fixes #4546

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.

Pull request overview

This PR updates windows-reactor-setup to embed and write a small dummy resources.pri during framework-dependent setup, instead of staging Microsoft.UI.pri from the Microsoft.WindowsAppSDK.InteractiveExperiences NuGet package. This keeps the required .pri file present for WinUI 1.8+ while reducing download/extract footprint until WindowsAppSDK PR #5828 is fixed.

Changes:

  • Stop downloading/staging Microsoft.WindowsAppSDK.InteractiveExperiences just to obtain Microsoft.UI.pri.
  • Write an embedded assets/resources.pri to resources.pri in the target output directory.
  • Treat *.pri as binary in .gitattributes to avoid text conversions/diffs.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
crates/libs/reactor-setup/src/lib.rs Removes InteractiveExperiences staging and writes an embedded resources.pri directly.
.gitattributes Marks *.pri as binary to preserve the embedded PRI file correctly in git.

@Alovchin91

Copy link
Copy Markdown
Contributor

Please take a look at the idea with ResourceManagerRequested here: #4546 (comment)
Could remove the need for an empty resources.pri file in the output directory altogether, effectively allowing a Reactor app to be a single executable file (I suppose).

@kennykerr kennykerr changed the title Replace framework-dependent resources.pri with a smaller blank windows-reactor-setup replace framework-dependent resources.pri Jun 11, 2026
@riverar

riverar commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

That'll put us in the middle of all custom resource manager requests and increase the risk we mishandle legitimate requests right? What if the dev wants to specify their own resource manager for their needs?

(The good news is we won't have to keep this code around for long. All signs are pointing to this getting fixed in the next Windows App SDK patch release.)

@Alovchin91

Alovchin91 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Does windows-reactor currently expose an API to attach a handler to ResourceManagerRequested or to get an instance of an Application? 🤔 If it does, and since this is hopefully getting fixed soon, maybe there’s no need for any mitigation on the reactor’s side, apart from documenting the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

windows-reactor-setup: not good to copy resources.pri

3 participants