WinGet COM API fails to install dependencies due to a sharing violation
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C++
- スター
- 26.6k
- フォーク
- 1.8k
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/winget-cli のほかの issue
-
Command-Install Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microsoft/winget-cli#6718 ·
メンテナーはふだん 2 日以内に返信
-
Issue-Docs Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/winget-cli#6692 ·
メンテナーはふだん 2 日以内に返信
-
Issue-Docs Possible-Duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/winget-cli#6493 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Issue-Feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/winget-cli#6427 ·
メンテナーはふだん 2 日以内に返信
-
Issue-Docs msstore
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
microsoft/winget-cli#6331 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
microsoft/winget-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cp-algorithms/cp-algorithms#1774 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
telefonicaid/fiware-orion#4836 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SanderMertens/flecs#2463 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信
-
nixd exits at startup when its parent process belongs to another user対応中かも @conao3 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nix-community/nixd#930 ·
メンテナーはふだん 2 日以内に返信