-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description of the new feature/enhancement
My team has a tool that uses WinGet to install components. On a customer's PC, we observed this failure:
winget list --exact --id Microsoft.PowerShell --source winget --disable-interactivity --accept-source-agreements failed with return code 0x80073CFC System.Exception: winget list --exact --id Microsoft.PowerShell --source winget --disable-interactivity --accept-source-agreements failed with return code 0x80073CFC
The root cause of this issue was that Microsoft.Winget.Source was in a bad state, specifically we saw this:
Get-AppxPackage Microsoft.Winget.Source
Name : Microsoft.Winget.Source
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : Neutral
ResourceId :
Version : 2025.115.913.49
PackageFullName : Microsoft.Winget.Source_2025.115.913.49_neutral__8wekyb3d8bbwe
InstallLocation : C:\Program Files\WindowsApps\Microsoft.Winget.Source_2025.115.913.49_neutral__8wekyb3d8bbwe
IsFramework : False
PackageFamilyName : Microsoft.Winget.Source_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Store
Status : PackageOffline, DataOffline, NotAvailable
The customer was able to resolve this issue by manually removing and re-installing Microsoft.Winget.Source like this:
Get-AppxPackage Microsoft.Winget.Source | Remove-AppxPackage -AllUsers
Get-AppxPackage Microsoft.Winget.Source
Install-Module Microsoft.WinGet.Client -Force -Repository PSGallery
Repair-WinGetPackageManager -Force -Latest
It would be nice if WinGet could self-heal in this type of scenario. Otherwise each app that depends on WinGet would need to implement repair logic or the customer needs to discover how to do that themselves.
Proposed technical implementation details (optional)
No response