microsoft / microsoft/winget-cli

winget tries to upgrade .NET 5 Runtime over and over

Open
#2,345 12 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Matching Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I have two .NET runtimes installed side by side: 5 and 6
image

winget sees the 5.0.17 version and tries to upgrade it to 6.0.7, even though 6.0.7 is already installed on the machine.

Steps to reproduce
  1. Install .NET Runtime 5.0.17
  2. Install .NET Runtime 6.0.7
  3. Run winget upgrade
  4. You'll see the following:
Name                                               Id                                Version       Available     Source
-----------------------------------------------------------------------------------------------------------------------
Microsoft .NET Runtime 6.0                         Microsoft.DotNet.Runtime.6        5.0.17.31213  6.0.7         winget
Expected behavior

winget treats .NET Runtime 5 and 6 as two different applications and does not offer new .NET 6 versions for .NET 5.

Actual behavior

winget treats .NET Runtime 5 and 6 the same application, offering new .NET 6 versions as upgrades for .NET 5.

Environment
Windows Package Manager v1.2.11601
Windows: Windows.Desktop v10.0.19044.1766
Package: Microsoft.DesktopAppInstaller v1.17.11601.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the listed .NET Runtime 5.0.17 and 6.0.7 installations, then run winget upgrade and inspect how the CLI matches installed packages to available upgrades. Done means separate runtime major versions are treated as distinct applications and the .NET 5 installation no longer receives .NET 6 upgrades.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.