Skip to content

Wrong .NET SDK version number when using winget upgrade #3070

Closed

Description

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

Activity

  1. added
    Issue-Bug
    Area-Matching
    and removed
    Needs-Triage
    on Mar 13, 2023
  2. CanePlayz commented on Mar 13, 2023

    @CanePlayz
    Author

    Oh, sorry, I didn't find those other issues because I was searching for .NET SKD and both of those issues talk about the runtime.

  3. denelon commented on Mar 13, 2023

    @denelon
    Collaborator

    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.

  4. CanePlayz commented on Mar 13, 2023

    @CanePlayz
    Author

    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.

    👍

  5. BrandonWanHuanSheng commented on Mar 14, 2023

    @BrandonWanHuanSheng

    Some folder left behind after upgrading to 7.0.201

  6. BrandonWanHuanSheng commented on Mar 14, 2023

    @BrandonWanHuanSheng

    Screenshot (84)

  7. CanePlayz commented on Mar 25, 2023

    @CanePlayz
    Author

    Also seems to happen for a PowerShell Preview, currently my PowerShell shows:

    PowerShell 7.4.0-preview.2
    PS C:\Users\jjpfs> winget upgrade
    Name                             ID                           Version   Available Source
    ----------------------------------------------------------------------------------------
    PowerShell 7-preview-x64         Microsoft.PowerShell.Preview > 7.3.8.0 7.4.0.2   winget
    Microsoft .NET SDK 6.0.407 (x64) Microsoft.DotNet.SDK.7       < 7.0.100 7.0.202   winget
    
  8. mdanish-kh commented on Mar 26, 2023

    @mdanish-kh
  9. CanePlayz commented on Mar 26, 2023

    @CanePlayz
    Author

    Also seems to happen for a PowerShell Preview, currently my PowerShell shows:

    This is another issue and would be fixed once below PRs get merged. I'll mark this comment as off-topic once these get merged; if you still have problems I'd say we open a new issue for it.

    Okay, thanks 👍

  10. added this to the milestone on Jun 5, 2023
  11. CanePlayz commented on Jul 26, 2023

    @CanePlayz
    Author

    A bit more information:

    When running winget list it recognized all SDKs as Microsoft.DotNet.SDK.7:

    Microsoft .NET SDK 8.0.100-preview.6.23330.1… Microsoft.DotNet.SDK.7                               > 7.0.306        8.0.100-previ… winget
    Microsoft .NET SDK 7.0.306 (x64)              Microsoft.DotNet.SDK.7                               7.0.306                         winget
    Microsoft .NET SDK 6.0.412 (x64)              Microsoft.DotNet.SDK.7                               < 7.0.100        7.0.306        winget
    
  12. MagicAndre1981 commented on Jul 27, 2023

    @MagicAndre1981

    Jacob Pfundstein (@CanePlayz) same like for me with the .net runtime where list shows IDs correctly, but upgrade command treats 6 runtime as 7 runtime.

  13. CanePlayz commented on Jul 27, 2023

    @CanePlayz
    Author

    Jacob Pfundstein (@CanePlayz) same like for me with the .net runtime where list shows IDs correctly, but upgrade command treats 6 runtime as 7 runtime.

    Yeah, it's all just a big mess right now and all over the place.

  14. CanePlayz commented on Aug 2, 2023

    @CanePlayz
    Author

    Interestingly, it works on my Surface:

    Microsoft .NET SDK 8.0.100-preview.6.23330.1… Microsoft.DotNet.SDK.Preview                              8.0.100-preview.6… winget
    Microsoft .NET SDK 7.0.306 (x64)              Microsoft.DotNet.SDK.7                                    7.0.306            winget
    Microsoft .NET SDK 6.0.412 (x64)              Microsoft.DotNet.SDK.6                                    6.0.412            winget
    
  15. CanePlayz commented on Aug 6, 2023

    @CanePlayz
    Author

    It might be worth looking into more feedback, cause it seems to be working on my PC now too! Did you change anything with those packages that could have done this?

  16. MagicAndre1981 commented on Aug 9, 2023

    @MagicAndre1981

    for me the issue with Dotnet Runtime is still the same even after this weeks patchday.

  17. CanePlayz commented on Feb 6, 2024

    @CanePlayz
    Author

    for me the issue with Dotnet Runtime is still the same even after this weeks patchday.

    How about now?

  18. MagicAndre1981 commented on Feb 6, 2024

    @MagicAndre1981

    for me the issue with Dotnet Runtime is still the same even after this weeks patchday.

    How about now?

    since November 2023 and installing .net 8 it works for me on that 1 laptop that suffered the issue for over 1 year.

  19. CanePlayz commented on Feb 6, 2024

    @CanePlayz
    Author

    Great, then I will close this issue.

  20. MagicAndre1981 commented on Feb 6, 2024

    @MagicAndre1981

    Great, then I will close this issue.

    doe it work for you now, too for the SDKs?

  21. CanePlayz commented on Feb 6, 2024

    @CanePlayz
    Author

    Great, then I will close this issue.

    doe it work for you now, too for the SDKs?

    Yup, been working for quite a while now

  22. MagicAndre1981 commented on Feb 22, 2024

    @MagicAndre1981

    Yup, been working for quite a while now

    just noticed that on one system I see the SDK mismatch again where 6.0.419 is detected as Mirosoft.DotNet.SDK.7 and offers 7.0.406 as upgrade

  23. modified the milestones: , 1.8 Client on Mar 6, 2024
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

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions