Skip to content

Fix: pack with --self-contained won't overwrite dupe files from runtime like resources.pri#554

Merged
Jaylyn-Barbee merged 5 commits into
mainfrom
zt/548-self-contained-bug
Jun 1, 2026
Merged

Fix: pack with --self-contained won't overwrite dupe files from runtime like resources.pri#554
Jaylyn-Barbee merged 5 commits into
mainfrom
zt/548-self-contained-bug

Conversation

@zateutsch
Copy link
Copy Markdown
Contributor

fixes #548

Generalized fix for this issue - any file that has a dupe in the dest directory will not be copied over from the runtime.

Copilot AI review requested due to automatic review settings May 28, 2026 23:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a --self-contained packaging bug (issue #548) where runtime files extracted from the Windows App SDK MSIX would overwrite the app's own files in the staging directory — most importantly resources.pri (destroying MRT mappings like Assets\SplashScreen.pngAssets\SplashScreen.scale-200.png) and Assets\StoreLogo.png, causing install failures with 0x80070002. The fix generalizes to skip any runtime file whose destination already exists, preserving app precedence during the runtime bundling step that runs after PRI generation in both single-package and bundle flows.

Changes:

  • In PrepareRuntimeForPackagingAsync, skip the copy when the destination file already exists in staging instead of overwriting it.
  • Switch file.CopyTo from overwrite: true to overwrite: false and emit a debug message for each skipped file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/winapp-CLI/WinApp.Cli/Services/MsixService.Runtime.cs Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Build Metrics Report

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 31.45 MB 31.45 MB 📈 +0.5 KB (+0.00%)
CLI (x64) 31.79 MB 31.79 MB ✅ 0.0 KB (0.00%)
MSIX (ARM64) 13.21 MB 13.21 MB 📉 -0.0 KB (-0.00%)
MSIX (x64) 14.05 MB 14.05 MB 📉 -0.0 KB (-0.00%)
NPM Package 27.50 MB 27.50 MB 📈 +0.5 KB (+0.00%)
NuGet Package 27.59 MB 27.59 MB 📈 +1.4 KB (+0.01%)
VS Code Extension 20.31 MB 20.31 MB 📈 +1.1 KB (+0.01%)

Test Results

1190 passed, 1 skipped out of 1191 tests in 514.5s (+4 tests, +86.2s vs. baseline)

Test Coverage

17.2% line coverage, 36.3% branch coverage · ✅ no change vs. baseline

CLI Startup Time

42ms median (x64, winapp --version) · ✅ -5ms vs. baseline


Updated 2026-06-01 18:05:09 UTC · commit 8615433 · workflow run

Copy link
Copy Markdown
Contributor

@Jaylyn-Barbee Jaylyn-Barbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jaylyn-Barbee Jaylyn-Barbee merged commit 68ecc82 into main Jun 1, 2026
22 checks passed
@Jaylyn-Barbee Jaylyn-Barbee deleted the zt/548-self-contained-bug branch June 1, 2026 18:05
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.

winapp pack --self-contained: installed MSIX fails with 0x80070002 (splash screen) — app's resources.pri is replaced by runtime's

3 participants