WinGet COM API fails to install dependencies due to a sharing violation
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 52/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- C++
- Sterne
- 26.6k
- Forks
- 1.8k
- Ø Merge
- 2 T. 18 Std.
- Gemergte PRs (30 T.)
- 42
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/winget-cli
-
Command-Install Needs-Triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
microsoft/winget-cli#6718 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Docs Needs-Triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
microsoft/winget-cli#6692 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Docs Possible-Duplicate
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
microsoft/winget-cli#6493 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/winget-cli#6427 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Docs msstore
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
microsoft/winget-cli#6331 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/winget-cli
Ähnliche Issues
-
difficulty:easy func:python os:windows prio:high type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
NatronGitHub/Natron#2029 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
ardazishvili/Sota#114 ·
Maintainer antworten meist innerhalb von 1 Tag
-
`Rect::containsPoint` is not `const`, so a `const Rect` cannot be asked whether it holds a pointOffenNeeds: Triage :mag:
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
react/react-native#60349 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100