Skip to content

winget tries to upgrade .NET 5 Runtime over and over #2345

Open

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

Activity

  1. ghost added
    Needs-Triage
    on Jul 17, 2022
  2. denelon commented on Jul 19, 2022

    @denelon
    Collaborator

    The issue with dotnet runtimes is due to there being multiple versions of the runtime installed side-by-side and is related to

    We have enhancements in Windows Package Manager 1.3 support for "AppsAndFeatures" data that will help in this scenario.

  3. added
    Issue-Bug
    and removed
    Needs-Triage
    on Jul 19, 2022
  4. dw72 commented on Jul 21, 2022

    @dw72

    For me, this situation is a little bit different... I have installed only one version 5.0.13

    image

    but winget list to install version 3.1.27

    image

    o course when I try install it

    image

  5. denelon commented on Jul 21, 2022

    @denelon
    Collaborator

    Dariusz Włodarczyk (@dw72)

    Can you try with "--verbose-logs" and share the resulting logs? I'd also like to know which version of Windows Package Manager you're running.

  6. dw72 commented on Jul 25, 2022

    @dw72
  7. denelon commented on Feb 22, 2023

    @denelon
    Collaborator

    Kirill Nikolaev (@exchange12rocks)? Is this still happening?

  8. added
    Needs-Author-Feedback
    on Feb 22, 2023
  9. exchange12rocks commented on Feb 22, 2023

    @exchange12rocks
    Author

    Demitrius Nelon (@denelon) Yes:

    Name                                        Id                           Version Available Source
    -------------------------------------------------------------------------------------------------
    Microsoft .NET Runtime - 5.0.17 (x64)       Microsoft.DotNet.Runtime.6   < 6.0.5 6.0.14    winget
    1 upgrade available.
    
  10. added
    Needs-Attention
    and removed
    Needs-Author-Feedback
    on Feb 22, 2023
  11. added
    Area-Matching
    and removed
    Needs-Attention
    on Feb 22, 2023
  12. modified the milestones: v1.5-Client, on Jun 6, 2023
  13. functionkey-12 commented on Dec 19, 2023

    @functionkey-12

    I am also having this issue with different versions of the .NET runtime and winget. I have .NET 6.0.23 installed and winget would like me to upgrade it to 6.0.25. However, I already have that version installed as well.

    In any case, winget downloads and attempts to install 6.0.25 and then closes shortly after starting the install. If I try to upgrade with the the -id flag, I get the "No installed packages [...]" message. If I try to install with the id, the package is found, downloaded and tries to install.

    I have also found and ran the .NET Fix Repair tool, and it found no issues with my installed packages.

    Winget version v1.6.3421

    winget_issue2345_20231219

  14. sharpsalat commented on Mar 30, 2024

    @sharpsalat

    Having similar issue:
    image

    image

  15. aaronliu0130 commented on Mar 30, 2024

    @aaronliu0130

    To workaround this, set the architecture and install.

  16. Chudesnov commented on Mar 31, 2024

    @Chudesnov

    set the architecture and install.

    Aaron Liu (@aaronliu0130) could you elaborate further?

  17. aaronliu0130 commented on Mar 31, 2024

    @aaronliu0130

    e.g. winget install Microsoft.DotNet.SDK.5 -a x64

  18. removed this from the milestone on Nov 14, 2024
  19. denelon commented on Apr 29, 2026

    @denelon
    Collaborator

    Potentially Correlated Issues

    The following open issues appear to share the same underlying root cause (version correlation incorrectly mapping across major versions):

    Note

    These potentially correlated issues were identified using GitHub Copilot CLI as a research tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-MatchingIssue-Bug

    Type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions