WinGet COM API fails to install dependencies due to a sharing violation
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 52/100
Direção de pesquisa
Start with the COM API install path used by PackageManager.InstallPackageAsync and compare its dependency installation flow with the WinGet CLI path, since the issue reports that the same packages install through the CLI. Read the related issue #6520 and investigate the sharing violation reported at Filesystem.cpp:1590; done means installing an APPX package and its dependency through the COM API succeeds.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Relevant area(s)
WinGet CLI, COM API
Relevant command(s)
No response
Brief description of your issue
We're using WinGet 1.29.380. We have an appx package with another appx package as a dependency, and WinGet fails to install the dependency. Installing the packages separately works fine, as does installing the package using the WinGet CLI with the same source; only installation via the COM API seems to fail.
Seems to be similar to #6520.
2026-11-19 17:17:02.208 <I> [CLI ] Generated temp download path: C:\Temp\WinGet\TUToolBox\Microsoft.VCLibs.140.00.UWPDesktop.14.0.33728.0\9c17b521f9d690a1f504da5108ed6eec5669eb3a8fd1331eef43e40d84e74283
2026-11-19 17:17:02.208 <I> [CLI ] Created authentication arguments. Mode: silentPreferred, Account:
2026-11-19 17:17:02.208 <I> [CORE] AuthenticationArguments values. Mode: silentPreferred, Account:
2026-11-19 17:17:02.208 <I> [CORE] Creating WebAccountManagerAuthenticator for microsoftEntraIdForAzureBlobStorage
2026-11-19 17:17:02.210 <I> [CORE] WebAccountManagerAuthenticator created for MicrosoftEntraId. Resource: https://storage.azure.com/, Scope:
2026-11-19 17:17:02.210 <I> [CORE] Started WebAccountManagerAuthenticator::AuthenticateForToken.
2026-11-19 17:17:02.210 <I> [CORE] Started GetTokenSilent.
2026-11-19 17:17:02.220 <I> [CORE] Authentication success
2026-11-19 17:17:02.220 <I> [CORE] HandleGetTokenResult Result: 0
2026-11-19 17:17:02.220 <I> [CORE] Finished WebAccountManagerAuthenticator::AuthenticateForToken. Result: 0
2026-11-19 17:17:02.220 <I> [CLI ] Installer download headers: Authorization: <Secret>; x-ms-version: 2020-04-08;
2026-11-19 17:17:02.220 <I> [CORE] Downloading to path: C:\Temp\WinGet\TUToolBox\Microsoft.VCLibs.140.00.UWPDesktop.14.0.33728.0\9c17b521f9d690a1f504da5108ed6eec5669eb3a8fd1331eef43e40d84e74283
2026-11-19 17:17:02.220 <I> [CORE] DeliveryOptimization downloading from url: https://tuwienwinget.blob.core.windows.net/winget/3ea4ecd2-46c3-481e-97d0-a49f4ec9870e/Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe-y8oY4pX6SQ.Appx
2026-11-19 17:17:07.571 <I> [CORE] Download completed.
2026-11-19 17:17:07.590 <I> [CORE] Started applying motw to C:\Temp\WinGet\TUToolBox\Microsoft.VCLibs.140.00.UWPDesktop.14.0.33728.0\9c17b521f9d690a1f504da5108ed6eec5669eb3a8fd1331eef43e40d84e74283 with zone: 3
2026-11-19 17:17:07.595 <I> [CORE] Finished applying motw
2026-11-19 17:17:07.596 <I> [CLI ] Installer hash verified
2026-11-19 17:17:07.598 <I> [CLI ] Successfully renamed downloaded installer. Path: C:\Temp\WinGet\TUToolBox\Microsoft.VCLibs.140.00.UWPDesktop.14.0.33728.0\Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe-y8oY4pX6SQ.msix
2026-11-19 17:17:07.598 <I> [CORE] Started applying motw using IAttachmentExecute to C:\Temp\WinGet\TUToolBox\Microsoft.VCLibs.140.00.UWPDesktop.14.0.33728.0\Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe-y8oY4pX6SQ.msix
2026-11-19 17:17:07.602 <I> [CORE] Started removing motw to C:\Temp\WinGet\TUToolBox\Microsoft.VCLibs.140.00.UWPDesktop.14.0.33728.0\Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe-y8oY4pX6SQ.msix
2026-11-19 17:17:07.602 <E> [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Downloader.cpp(500)\WindowsPackageManager.dll!6AAC86E2: (caller: 6AAC8D0E) Exception(2) tid(7840) 80070003 Das System kann den angegebenen Pfad nicht finden.
2026-11-19 17:17:07.603 <W> [CORE] RemoveMotwIfApplicable failed before IAttachmentExecute::Save(). Result: -2147024893. Proceeding with Save()
2026-11-19 17:17:07.935 <I> [CORE] Finished applying motw using IAttachmentExecute. Result: 0 IAttachmentExecute::Save() result: 0
2026-11-19 17:17:07.937 <I> [CLI ] Found existing installer file at 'C:\Temp\WinGet\TUToolBox\Cisco.AnyConnect.5.1.7093.0\CiscoSystems.AnyConnect_5.1.7093.0_x64__edjcgkw48dhxt-6HXMyS2PhH.msix'. Verifying file hash.
2026-11-19 17:17:07.941 <I> [CLI ] Existing installer file hash matches. Will use existing installer.
2026-11-19 17:17:07.941 <I> [CLI ] Installer hash verified
2026-11-19 17:17:07.942 <I> [CORE] Started applying motw using IAttachmentExecute to C:\Temp\WinGet\TUToolBox\Cisco.AnyConnect.5.1.7093.0\CiscoSystems.AnyConnect_5.1.7093.0_x64__edjcgkw48dhxt-6HXMyS2PhH.msix
2026-11-19 17:17:07.943 <I> [CORE] Started removing motw to C:\Temp\WinGet\TUToolBox\Cisco.AnyConnect.5.1.7093.0\CiscoSystems.AnyConnect_5.1.7093.0_x64__edjcgkw48dhxt-6HXMyS2PhH.msix
2026-11-19 17:17:07.944 <E> [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Downloader.cpp(500)\WindowsPackageManager.dll!6AAC86E2: (caller: 6AAC8D0E) Exception(3) tid(b23c) 80070003 Das System kann den angegebenen Pfad nicht finden.
2026-11-19 17:17:07.944 <W> [CORE] RemoveMotwIfApplicable failed before IAttachmentExecute::Save(). Result: -2147024893. Proceeding with Save()
2026-11-19 17:17:08.209 <I> [CORE] Finished applying motw using IAttachmentExecute. Result: 0 IAttachmentExecute::Save() result: 0
2026-11-19 17:17:08.213 <I> [CLI ] Executing command: install
2026-11-19 17:17:08.213 <E> [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerSharedLib\Filesystem.cpp(1590)\WindowsPackageManager.dll!6AC08A52: (caller: 6AC1478C) Exception(4) tid(ea98) 80070020 Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
2026-11-19 17:17:08.213 <E> [CLI ] Caught wil::ResultException: C:\__w\1\s\external\pkg\src\AppInstallerSharedLib\Filesystem.cpp(1590)\WindowsPackageManager.dll!6AC08A52: (caller: 6AC1478C) Exception(4) tid(ea98) 80070020 Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
2026-11-19 17:17:08.218 <I> [CLI ] Successfully refreshed process PATH environment variable.
2026-11-19 17:17:08.218 <E> [CLI ] Terminating context: 0x8a150110 at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:356
Steps to reproduce
Have an APPX package depending on an APPX package, and install the package using PackageManager.InstallPackageAsync:
const auto installOptions{ winrt::create_instance<winget::InstallOptions>(CLSID_InstallOptions) };
installOptions.PackageVersionId(versionId);
installOptions.PackageInstallMode(winget::PackageInstallMode::Silent);
installOptions.PackageInstallScope(InstallScopeToPackageInstallScope(scope));
installOptions.AuthenticationArguments(m_authenticationArguments);
const auto result{ WaitForAsync(m_packageManager.InstallPackageAsync(catalogPackage, installOptions), callback)};
if (result.Status() != winget::InstallResultStatus::Ok)
{
winrt::throw_hresult(result.ExtendedErrorCode());
}
Expected behavior
The packages install successfully.
Actual behavior
The dependency fails to install.
Environment
Microsoft.WindowsPackageManager.InProcCom.1.29.380 from NuGet
- Linguagem predominante
- C++
- Estrelas
- 26.6k
- Forks
- 1.8k
- Merge médio
- 2d 18h
- PRs com merge (30d)
- 42
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/winget-cli
-
Command-Install Needs-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
microsoft/winget-cli#6718 ·
Mantenedores costumam responder em até 2 dias
-
Issue-Docs Needs-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
microsoft/winget-cli#6692 ·
Mantenedores costumam responder em até 2 dias
-
Issue-Docs Possible-Duplicate
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
microsoft/winget-cli#6493 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
WinGetSourceCreator: PackWithMappingFile should verify makeappx.exe exists before invoking itAbertaIssue-Feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/winget-cli#6427 ·
Mantenedores costumam responder em até 2 dias
-
Issue-Docs msstore
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
microsoft/winget-cli#6331 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
Todas as issues de microsoft/winget-cli
Issues semelhantes
-
difficulty:easy func:python os:windows prio:high type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NatronGitHub/Natron#2029 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
ardazishvili/Sota#114 ·
Mantenedores costumam responder em até 1 dia
-
`Rect::containsPoint` is not `const`, so a `const Rect` cannot be asked whether it holds a pointAbertaNeeds: Triage :mag:
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
react/react-native#60349 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100