Repository navigation
Description
Is your feature request related to a problem? Please describe.
The extension's winapp.unregister command resolves a project directory and runs a bare winapp unregister from that directory. In winapp CLI v0.6.1, the package target is selected from --manifest <path> or by non-recursive manifest auto-detection in the current directory.
This makes the extension's targeting unreliable and asymmetric with registration:
winapp runand the debug provider register from a build-output folder, while unregister targets a detected project directory.resolveProjectDirectorydetects project files such as.csproj,Cargo.toml, andpackage.json; it does not detectPackage.appxmanifest.- The current terminal-based
runWinappCommandpath returns immediately and does not expose exit status or output, so the extension cannot recognize the CLI's install-location check failure or offer the supported--forcerecovery. - Worktree moves and rebuilds commonly leave a development package registered from a different project tree, causing plain unregister to refuse.
The command only applies to packages registered in development mode, such as packages created by winapp run or create-debug-identity; it does not generally undo installation of a signed MSIX via Add-AppxPackage.
Describe the solution you'd like
Make winapp.unregister manifest-aware and align it with the package registration lifecycle:
- Resolve the target manifest in the extension and always pass
--manifestrather than relying on cwd auto-detection. - Prefer the manifest or input folder associated with the most recent
winapp run, debug session, orcreate-debug-identityinvocation when that target is still valid. - Otherwise scan the workspace for app manifests, select a single result automatically, and prompt when multiple manifests are present. Respect
winapp.appDirectorieswhen ranking or restricting candidates. - Execute unregister through the capture-based process path with an argument array and inspect its result, preferably using
--jsonif the v0.6.1 payload provides a stable error classification. - Run without
--forcefirst. If the CLI specifically reports an install-location mismatch, show a warning with an Unregister anyway action that retries once with--force. Do not ask about force up front. - Show the manifest-derived package identity/display name while unregistering. Do not add a modal confirmation for the normal path; the force retry is the deliberate confirmation point.
- Treat an already-unregistered package as an informational no-op, and surface all unrecognized failures with a link/action to the WinApp output channel.
- Improve discoverability in the run/debug lifecycle, while coordinating with
winapp run --unregister-on-exitso users are not prompted twice. Do not add unregister to the packaging completion actions, because packaging/installing an MSIX is a different lifecycle.
Additional context
CLI v0.6.1 schema for unregister exposes:
--manifest <path>— path to the Package.appxmanifest; default is auto-detection from the current directory.--force— skip the install-location directory check and unregister even if the package was registered from a different project tree.--json— machine-readable output.
Implementation should verify real unregister --json payloads for success, not-registered, and install-location mismatch before choosing JSON classification versus narrowly tested stderr matching.
Related but not a duplicate: #251 tracks multi-root workspaces generally. This issue focuses on manifest/package targeting, force recovery, and development-package lifecycle UX.
Activity