microsoft / microsoft/aspire

`winget uninstall Microsoft.Aspire` fails on dogfood `LocalManifestFiles` installs (exit -1978335212)

Open
#17,944 1 comment 0 reactions 0 assignees View on GitHub
area-engineering-systems triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Summary

`winget uninstall --id Microsoft.Aspire` and `eng/winget/dogfood.ps1 -Uninstall` both fail with exit code `-1978335212` (`APPINSTALLER_CLI_ERROR_NO_APPLICABLE_INSTALLER` / "the input value is invalid") when the Aspire install was created via the dogfood `LocalManifestFiles` path. The recorded source for a dogfood install ends with `__DefaultSource` rather than `_Microsoft.Winget.Source_8wekyb3d8bbwe`, and winget's uninstall lookup doesn't resolve `Microsoft.Aspire` against that source identifier the same way.

Manual cleanup currently requires removing three pieces by hand:

```powershell
Remove-Item $pkgDir -Recurse -Force # %LOCALAPPDATA%\Microsoft\WinGet\Packages\Microsoft.Aspire__DefaultSource
Remove-Item $link -Force # %LOCALAPPDATA%\Microsoft\WinGet\Links\aspire.exe
Remove-Item $arpKey -Recurse -Force # HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft.Aspire__DefaultSource
```

This is awkward for anyone running the dogfood path repeatedly (PR validation, CI runs of `prepare-installer-artifacts.yml`, developer iteration). It also leaves contributors who attempt `winget uninstall` confused about why it didn't work.

### What should happen

`eng/winget/dogfood.ps1 -Uninstall` should detect the `__DefaultSource` install shape and tear it down via the same three-step manual cleanup, rather than relying on `winget uninstall`. If winget itself has a documented way to uninstall a `LocalManifestFiles` install in newer releases, prefer that.

### Possibly out of our control

The root cause may be in winget-cli rather than in our scripts — `winget uninstall` arguably *should* work against any package it can find in the ARP registry regardless of source identifier. If so, file upstream at https://github.com/microsoft/winget-cli and have `dogfood.ps1 -Uninstall` work around it in the meantime.

### Context

Surfaced while writing the Windows test runbook for #17919. The full followups doc is at [PR #17919 comment](https://github.com/microsoft/aspire/pull/17919#issuecomment-4628542452).

Contributor guide

Open the contributing guide

Research direction

Start with eng/winget/dogfood.ps1 -Uninstall and reproduce the failure using a dogfood LocalManifestFiles install. Compare the __DefaultSource paths and cleanup steps listed in the issue, then verify that uninstall removes the package directory, aspire.exe link, and ARP registry key; check whether winget-cli documents a newer supported uninstall path.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.