Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
CanePlayz opened this issue Mar 13, 2023 · 21 comments
Closed

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

CanePlayz opened this issue Mar 13, 2023 · 21 comments
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@CanePlayz
Copy link

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
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Mar 13, 2023
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Matching Issue related to correlation between installed package and manifest and removed Needs-Triage Issue need to be triaged labels Mar 13, 2023
@CanePlayz
Copy link
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.

@denelon
Copy link
Contributor

denelon commented Mar 13, 2023

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.

@CanePlayz
Copy link
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.

👍

@BrandonWanHuanSheng
Copy link

Some folder left behind after upgrading to 7.0.201

@BrandonWanHuanSheng
Copy link

Screenshot (84)

@CanePlayz
Copy link
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

@mdanish-kh

This comment was marked as off-topic.

@CanePlayz
Copy link
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 👍

@denelon denelon added this to the v.Next-Client milestone Jun 5, 2023
@CanePlayz
Copy link
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

@MagicAndre1981
Copy link

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

@CanePlayz
Copy link
Author

@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.

@CanePlayz
Copy link
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

@CanePlayz
Copy link
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?

@MagicAndre1981
Copy link

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

@CanePlayz
Copy link
Author

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

How about now?

@MagicAndre1981
Copy link

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.

@CanePlayz
Copy link
Author

Great, then I will close this issue.

@MagicAndre1981
Copy link

Great, then I will close this issue.

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

@CanePlayz
Copy link
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

@MagicAndre1981
Copy link

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

@denelon denelon modified the milestones: v.Next-Client, 1.8 Client Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

5 participants