winget-cli
winget-cli copied to clipboard
Repair-WinGetPackageManager does not consider dependencies in the `AppInstallerNotRegistered` case
Brief description of your issue
If the package is present but not registered (the AppInstallerNotRegistered case), we simply attempt to register the package during repair. If the reason that it is not registered is due to missing dependencies, this just fails.
Steps to reproduce
Stage the package without its dependencies. [Maybe?] Attempt Repair.
Expected behavior
Repair always succeeds (with network access).
Actual behavior
An error:
VERBOSE: Creating MTA thread
VERBOSE: 'winget.exe' Win32Exception An error occurred trying to start process 'winget.exe' with working directory 'C:\Users\...\Desktop'. The system cannot find the file specified.
VERBOSE: Executing Appx cmdlet Get-AppxPackage -Name Microsoft.DesktopAppInstaller
VERBOSE: Integrity category type: AppInstallerNotRegistered
VERBOSE: Executing Appx cmdlet Get-AppxPackage -Name Microsoft.DesktopAppInstaller
VERBOSE: Executing Appx cmdlet Add-AppxPackage -Path C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.22.10661.0_x64__8wekyb3d8bbwe\AppxManifest.xml -Register -DisableDevelopmentMode
Add-AppxPackage: Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict validation.
Windows cannot install package Microsoft.DesktopAppInstaller_1.22.10661.0_x64__8wekyb3d8bbwe because this package depends on a framework that could not be found. Provide the framework "Microsoft.UI.Xaml.2.8" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minimum version 8.2310.30001.0, along with this package to install.
NOTE: For additional information, look for [ActivityId] a8ed85d4-227c-0001-7225-987b4c84da01 in the Event Log or use the command line Get-AppPackageLog -ActivityID a8ed85d4-227c-0001-7225-987b4c84da01
VERBOSE: 'winget.exe' Win32Exception An error occurred trying to start process 'winget.exe' with working directory 'C:\Users\dgonch\Desktop'. The system cannot find the file specified.
VERBOSE: Executing Appx cmdlet Get-AppxPackage -Name Microsoft.DesktopAppInstaller
VERBOSE: AppInstallerNotRegistered encountered previously
Repair-WinGetPackageManager: The App Installer is not registered.
Environment
Any.