Skip to content

Support MSIX bundles and project mode in winapp.pack - #309

Merged
Jaylyn Barbee (Jaylyn-Barbee) merged 11 commits into
mainfrom
chiaramooney-winapp-pack-bundle-and-cert-opts
Nov 9, 2026
Merged

Jaylyn Barbee (Jaylyn-Barbee) merged 11 commits into
mainfrom
chiaramooney-winapp-pack-bundle-and-cert-opts

Conversation

@chiaramooney

@chiaramooney Chiara Mooney (chiaramooney) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Expands WinApp: Create MSIX Package or Bundle to support both WinApp CLI packaging modes:

  • Build and package a .NET project — discovers .csproj, .sln, and .slnx targets using the project discovery introduced by Surface winapp run project mode in the palette and debugger #283, resolves solutions to one concrete application .csproj, and builds one or more selected architectures.
  • Package existing build output — preserves the multi-select folder flow, where one folder creates an .msix and two or more folders create an .msixbundle.

Project mode supports x64, arm64, and x86, with the current process architecture preselected. Selecting multiple architectures emits repeated --arch arguments and creates an MSIX bundle. Users can use the CLI's Release default, select Debug, or type a custom MSBuild configuration.

Signing choices are source-aware: project mode can honor project signing settings, generate and install a development certificate, or explicitly create unsigned output. Existing-output mode retains its current development-certificate choice. The change also preserves the self-contained architecture warning only where it is meaningful, recognizes the CLI's 📦 Bundle: marker, generalizes artifact containment roots, and surfaces explicit CLI error text.

Usage Example

Run WinApp: Create MSIX Package or Bundle and choose a source.

For project mode:

  1. Select a discovered project or solution. A solution with multiple application projects prompts for one concrete .csproj.
  2. Select one architecture for an .msix, or multiple architectures for an .msixbundle.
  3. Select the Release default, Debug, or a custom build configuration.
  4. Choose project signing, a generated development certificate, or unsigned output.
  5. Choose whether to bundle the Windows App SDK runtime self-contained.

The resulting bundle invocation is equivalent to:

winapp pack .\MyApp.csproj --arch x64 --arch arm64 --configuration Release --no-sign

For existing output, select one or more architecture-specific folders:

winapp pack publish\x64 publish\arm64 --generate-cert --install-cert

Related Issue

Closes #307

Advanced pack options that remain intentionally deferred are tracked in #322.

Type of Change

  • ✨ New feature
  • 📝 Documentation
  • ♻️ Refactoring
  • 🧪 Test update

Checklist

  • New tests added for new functionality (if applicable)
  • Ran .\scripts\build-vsce.ps1 locally
  • Tested locally on Windows (if applicable)
  • README.md updated (if applicable)

Screenshots / Demo

No screenshot attached. The command now starts with a source picker, reuses the established project/solution picker styling, and uses multi-select checkboxes for project architectures and existing build-output folders.

Additional Notes

Validation on the current branch:

  • npm run test:unit — passed, 1476/1476 tests, including a new pack-cli-contract.test.ts against the repository-pinned WinApp CLI v0.7.1.
  • npm run lint — passed with 0 errors and 10 pre-existing warnings.
  • npm run package — passed.
  • .\scripts\build-vsce.ps1 — passed, including 1476/1476 unit tests.
  • run-target-picker.spec.ts — all existing run-target regressions and both project-pack picker scenarios passed (19/19); the subsequently added existing-output bundle scenario also passed in its targeted run.
  • Manual real-CLI project validation — successfully produced an unsigned Release x64 .msix from a .csproj.
  • Manual real-CLI project bundle validation — successfully produced an unsigned Release x64/arm64 .msixbundle using repeated --arch arguments.

The full E2E suite's previously known sign-quickpick.spec.ts failures remain unrelated to this change and were reproduced against pristine main. The project discovery refactor was specifically covered by the complete run-target picker regression suite.

The CLI rejects duplicate architectures using PE-header inspection. Selecting unrelated existing-output folders remains treated as user error, as previously agreed.

AI Description

This section is auto-generated by AI when the PR is opened or updated. To opt out, delete this entire section including the marker comments.

@chiaramooney
Chiara Mooney (chiaramooney) force-pushed the chiaramooney-winapp-pack-bundle-and-cert-opts branch from f6bcb03 to 63caab3 Compare October 19, 2026 20:40
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

⏳ Build in progress — the VSIX size below is from a previous commit and will update when the current build finishes.

VSIX Build

Artifact Baseline Current Delta
VS Code Extension (VSIX) 39.33 MB 39.33 MB 📈 +2.4 KB (+0.01%)

Updated 2026-10-20 22:43:20 UTC · commit 24142d9 · workflow run

@chiaramooney Chiara Mooney (chiaramooney) changed the title Support creating MSIX bundles from winapp.pack Support MSIX bundles and project mode in winapp.pack Oct 19, 2026
@chiaramooney
Chiara Mooney (chiaramooney) marked this pull request as ready for review October 20, 2026 22:21
@chiaramooney Chiara Mooney (chiaramooney) added the ready-for-review Agent work and checks complete; awaiting human review label Nov 9, 2026
The winapp CLI creates an MSIX bundle when its variadic <input-folder>
argument receives more than one folder, but the extension's build output
picker was single-select, so bundles were unreachable.

Make the pack picker multi-select. Selecting two or more folders now
passes them all positionally and the CLI emits a .msixbundle. Browse...
keeps its existing item and styling; ticking it takes precedence over
other selections and opens a folder dialog that also accepts multiple
folders. winapp.run keeps the single-select picker.

Also fix artifact parsing: a bundle run prints '(package) Bundle:'
rather than '(package) Package:', so a successful bundle previously
parsed to undefined and was reported as a packaging failure.

Skip the self-contained architecture mismatch warning for bundles. The
CLI packs each bundle slice with an explicit per-slice architecture
override, so every package gets a matching runtime; only the
single-package path resolves the runtime from the machine architecture.

Duplicate-architecture selections are intentionally left to the CLI,
which detects architecture from PE headers and reports both offending
folders.

Co-authored-by: Copilot App <[email protected]>
The multi-folder bundle selection logic lived inline in the winapp.pack
handler, so it had no automated coverage. Move the pure parts into
src/pack-args.ts and cover them with unit tests.

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
@chiaramooney
Chiara Mooney (chiaramooney) force-pushed the chiaramooney-winapp-pack-bundle-and-cert-opts branch from 24142d9 to 2821787 Compare November 9, 2026 21:29
@Jaylyn-Barbee
Jaylyn Barbee (Jaylyn-Barbee) merged commit 7662746 into main Nov 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Agent work and checks complete; awaiting human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support creating MSIX bundles from multiple pack inputs

2 participants