microsoft / microsoft/winget-cli
AppsAndFeaturesEntries matching oddly incorrect with apps installed outside of winget
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
I didn't know what to title this so sorry for the vagueness.
https://github.com/microsoft/winget-cli/issues/3004 describes an issue where if you have multiple major versions of the .NET Desktop Runtime installed they will be matched to the same package, even though different major versions of the runtime use different identifiers (and all of the manifests have AppsAndFeaturesEntries). It was thought to be a weird caching issue, but I can reproduce it even on fresh installs of Windows/winget so I don't think that's it.
Steps to reproduce
- Install .NET Desktop Runtime 3.1 from the Microsoft download site (or anywhere else, like Visual Studio): https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.27/windowsdesktop-runtime-3.1.27-win-x64.exe
- Install the .NET 6 Desktop Runtime via winget (
winget install Microsoft.DotNet.DesktopRuntime.6 -s winget). It does not reproduce if you install .NET 6 outside of winget. - Run
winget upgrade.
Expected behavior
No upgrades for .NET are available (since I just installed it)
Actual behavior
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> winget upgrade
Name Id Version Available
------------------------------------------------------------------------------------------------------------
Microsoft Edge Microsoft.Edge 90.0.818.66 103.0.1264.77
Microsoft Windows Desktop Runtime - 3.1.27 (x64) Microsoft.DotNet.DesktopRuntime.6 < 6.0.5 6.0.7
2 upgrades available.
PS C:\Users\WDAGUtilityAccount\Desktop\winget-pkgs> # Go home ARPChanges.cpp, you're drunk!
My guess is that winget is re-matching .NET runtime 3.1 after installing .NET 6, and considering them as the same identifier (especially since it's correctly matched as Microsoft.DotNet.DesktopRuntime.3_1 before you install .NET 6). I know it's kind of a weird set of steps to follow, but the only reason I noticed this was because it happened without me trying on my work computer (since .NET 3.1 was installed with VS 2019, and .NET 6 wasn't).
Environment
Windows Package Manager v1.3.2091
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22000.795
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2091.0
Any other software? 3D Pinball for Windows - Space Cadet
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
Start with ARPChanges.cpp, which the report identifies as involved in matching installed applications, and reproduce the sequence using the listed .NET 3.1 and .NET 6 installations. Run winget upgrade before and after installing .NET 6 through winget, then compare the identifiers and versions that are matched. Done means the separately installed runtimes no longer appear as the same upgrade.
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
- 35/100