microsoft / microsoft/winget-cli
Cannot install MSIX packages with WinGet on Windows Sandbox (Exit code: 0x80070002)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
Installing an MSIX app through WinGet on Windows Sandbox fails with Installer failed with exit code: 0x80070002 : The system cannot find the file specified. Note that manually installing the MSIX or using Add-AppxPackage works correctly. The only exception I've found is Microsoft.VCLibs. One can install WinGet 1.6 on Sandbox (that uses an older VCLibs) and then run winget upgrade Microsoft.VCLibs and it'll successfully install the MSIX package. There may be more exceptions, but this is the only one I've found thus far
Steps to reproduce
- Install WinGet on Windows Sandbox
- Install an MSIX App like
Microsoft.WindowsTerminalor any other
Expected behavior
MSIX app installs successfully
Actual behavior
Installer failed with exit code: 0x80070002 : The system cannot find the file specified.
Installer installs successfully with Add-AppxPackage though
Verbose logs
WinGet-2024-11-18-01-51-31.815.log
Seems to fail at the deployment at
2024-11-18 01:51:37.424 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFD6F7FCA3B: (caller: 00007FFD6F7FB1C1) Exception(2) tid(1850) 80073CF1 Package was not found.
Msg:[Operation failed: Windows cannot remove Microsoft.WindowsTerminal_3001.21.2911.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.]
2024-11-18 01:51:37.424 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(186)\WindowsPackageManager.dll!00007FFD6F93EAB5: (caller: 00007FFD6F7F7F63) LogHr(3) tid(1850) 80073CF1 Package was not found.
Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FFD6F7FCA3B: (caller: 00007FFD6F7FB1C1) Exception(2) tid(1850) 80073CF1 Package was not found.
Msg:[Operation failed: Windows cannot remove Microsoft.WindowsTerminal_3001.21.2911.0_neutral_~_8wekyb3d8bbwe because the current user does not have that package installed. Use Get-AppxPackage to see the list of packages installed.]
]
2024-11-18 01:51:37.465 [CLI ] MSIX installer failed: 2147942402
Environment
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.4460
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Enabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the MSIX installation failure in Windows Sandbox using the reported WinGet version and compare it with Add-AppxPackage. Then inspect external/pkg/src/AppInstallerCommonCore/Deployment.cpp around the logged failures at lines 54 and 186. Done means the reported MSIX app installs successfully through WinGet in the Sandbox without the file-not-found error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100