winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

AppsAndFeaturesEntries matching oddly incorrect with apps installed outside of winget

Open jedieaston opened this issue 3 years ago • 0 comments

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

  1. 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
  2. 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.
  3. 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

jedieaston avatar Aug 03 '22 12:08 jedieaston