winget-cli: Wrong .NET SDK version number when using winget upgrade
Brief description of your issue
winget list
does correctly detect the versions of the .NET SDK that I have installed by using the manifest field which matches version from Apps & Features with actual version numbers.
PS C:\Users\jjpfs> winget list dotnet
Name ID Version Source
-----------------------------------------------------------------------
Microsoft .NET SDK 7.0.201 (x64) Microsoft.DotNet.SDK.7 7.0.201 winget
Microsoft .NET SDK 6.0.406 (x64) Microsoft.DotNet.SDK.6 6.0.406 winget
However, when I run winget upgrade
, it offers an update and mixes up .NET 6 and 7 as you can see by the different name and ID.
PS C:\Users\jjpfs> winget upgrade
Name ID Version Available Source
----------------------------------------------------------------------------------
Microsoft .NET SDK 6.0.406 (x64) Microsoft.DotNet.SDK.7 < 7.0.100 7.0.201 winget
Steps to reproduce
Have different .NET SDKs installed and run winget upgrade
Expected behavior
Show the right version number and don’t offer an update
Actual behavior
Shows wrong version number and offers an update
Environment
Windows 11
Winget v1.5.441-preview
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 21 (3 by maintainers)
Yup, been working for quite a while now
No worries. We’ve identified a fix for a few scenarios. I’m trying to map “Area-Matching” to help group these related issues together so we can see which ones are addressed.