Conversation
…ackage.appxmanifest
Build Metrics ReportBinary Sizes
Test Results✅ 402 passed out of 402 tests in 361.6s (+20 tests, +8.3s vs. baseline) Test Coverage❌ 42% line coverage, 45.8% branch coverage · CLI Startup Time35ms median (x64, Updated 2026-03-06 23:32:27 UTC · commit |
There was a problem hiding this comment.
Pull request overview
Fixes several WinApp CLI packaging edge cases seen with new/blank WinUI projects by improving manifest discovery, preserving existing PRI resources, and enhancing manifest/packaging metadata.
Changes:
- Support
package.appxmanifestin addition toappxmanifest.xml(search + CLI/docs text updates). - Avoid overwriting existing
resources.pri; resolvex-generateLanguages from existing PRI; improve PRI config defaults (scale). - Detect executable architecture to populate/warn about
ProcessorArchitectureand include it in default MSIX filename; remove WinAppSDK bootstrapper DLLs from staging.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/winapp-CLI/WinApp.Cli/Services/MsixService.cs | Adds manifest discovery, PRI/language handling, arch detection, and staging cleanup to fix packaging behavior |
| src/winapp-CLI/WinApp.Cli/Commands/PackageCommand.cs | Updates command help text to reflect manifest options |
| src/winapp-CLI/WinApp.Cli.Tests/MsixServiceTests.cs | Adds unit tests for new helper methods (manifest search, scale detection, x-generate replacement, bootstrapper removal) |
| docs/cli-schema.json | Updates package command description in generated schema |
| .github/plugin/skills/winapp-cli/package/SKILL.md | Updates package skill docs to reflect manifest options |
| .gitattributes | Adds LF normalization for plugin/docs files to match generation output |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| file.Delete(); | ||
| taskContext.AddDebugMessage($"{UiSymbols.Note} Removed {fileName} (not needed in MSIX package)"); |
There was a problem hiding this comment.
FileInfo.Delete() can throw (locked file, ACL/readonly, AV scanning, etc.), which would fail packaging even though removing these DLLs is an optimization/safety step. Consider wrapping the delete in try/catch and logging a warning (and continuing), possibly clearing the readonly attribute first if needed.
| file.Delete(); | |
| taskContext.AddDebugMessage($"{UiSymbols.Note} Removed {fileName} (not needed in MSIX package)"); | |
| try | |
| { | |
| // Ensure the file is not read-only before attempting deletion. | |
| if (file.Attributes.HasFlag(FileAttributes.ReadOnly)) | |
| { | |
| file.Attributes &= ~FileAttributes.ReadOnly; | |
| } | |
| file.Delete(); | |
| taskContext.AddDebugMessage($"{UiSymbols.Note} Removed {fileName} (not needed in MSIX package)"); | |
| } | |
| catch (IOException ex) | |
| { | |
| taskContext.AddDebugMessage($"{UiSymbols.Note} Failed to remove {fileName} (optional cleanup step): {ex.Message}"); | |
| } | |
| catch (UnauthorizedAccessException ex) | |
| { | |
| taskContext.AddDebugMessage($"{UiSymbols.Note} Failed to remove {fileName} due to access restrictions (optional cleanup step): {ex.Message}"); | |
| } | |
| catch (SecurityException ex) | |
| { | |
| taskContext.AddDebugMessage($"{UiSymbols.Note} Failed to remove {fileName} due to security restrictions (optional cleanup step): {ex.Message}"); | |
| } |
…
Description
This PR fixes package command issue found when attempting to package a blank new winui project from visual studio.
WIP
Usage Example
Related Issue
Type of Change
Checklist
docs/fragments/skills/(if CLI commands/workflows changed)Screenshots / Demo
Additional Notes
AI Description
This PR addresses several bugs in the packaging command for WinApp CLI, specifically improving the handling of existing PRI resources, checking executable architecture for inclusion in the manifest, and allowing the use of
package.appxmanifest. The command now supports eitherappxmanifest.xmlorpackage.appxmanifestas a manifest file.winapp package ./dist --manifest appxmanifest.xml --cert ./devcert.pfx # or winapp package ./dist --manifest package.appxmanifest --cert ./devcert.pfx