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

.NET SDK (Microsoft.dotnet) installs wrong version #2105

Open
bc3tech opened this issue Apr 19, 2022 · 10 comments
Open

.NET SDK (Microsoft.dotnet) installs wrong version #2105

bc3tech opened this issue Apr 19, 2022 · 10 comments
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@bc3tech
Copy link

bc3tech commented Apr 19, 2022

Notice in this screenshot, winget reports it has found version 6.1.xxx on my machine and needs to install v6.2.xxx
However, when it pulls the pkg and begins downloading the installer, it installs 6.0.xxx instead

image

@ghost ghost added the Needs-Triage Issue need to be triaged label Apr 19, 2022
@bc3tech
Copy link
Author

bc3tech commented Apr 19, 2022

Wasn't sure whether this was a CLI bug or a pkg bug. If needs to be moved to winget-pkgs feel free to do so

@denelon
Copy link
Contributor

denelon commented Apr 19, 2022

This is a case where the "Display Name" doesn't match the "Version".

We've got some enhancements coming so we can display the "Display Name" and still manage upgrades from the "Version.

Screenshot Net 6 0 202

@denelon denelon added Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Apr 19, 2022
@bc3tech
Copy link
Author

bc3tech commented Apr 19, 2022

How does that jive w/ the actual binary being downloaded, though? (lowest arrow in screenshot)

@denelon
Copy link
Contributor

denelon commented Apr 19, 2022

The binary name in this case is based on the "marketing version" or "display version" in Windows Apps & Features or Add/Remove Programs. The value highlighted in yellow is the registry entry made by that installer. There really isn't anything to force these values to conform with each other.

When we built the "upgrade" behavior, we needed a consistent reliable mechanism for determining which version of a package was installed on the machine. The decision was made to do this based on the version reported from the registry. The current manifest schema 1.1 doesn't support the comparison outside of the "PackageVersion" attribute in the manifest, so we've been keeping that aligned so that the upgrade scenario isn't broken.

In the next release we are aiming to be able to compare against the values in the manifest for "AppsAndFeatures" rather than the "PackageVersion". That would allow the package to be displayed as 6.0.202 in this case, and we would know based on the registry value and the "AppsAndFeatures" value in the manifest whether an upgrade should be performed or not.

@bc3tech
Copy link
Author

bc3tech commented Apr 19, 2022

thanks for that explanation. Is this perhaps something I should file on the -pkgs repo? Or nothing really to be done about it right now?

@denelon
Copy link
Contributor

denelon commented Apr 19, 2022

For now, I wouldn't worry about it. The .NET team is ramping up to start generating all their manifests, and the changes coming for "AppsAndFeatures" should alleviate most of the confusion.

@devbeard
Copy link

Since some releated issues were closed referencing this, I'm posting here.

For some reason, my issues with the multiple attempted upgrades of the .NET 5 and 6 SDKs disappeared today. When I type winget upgrade I usually get a list with the dotnet 5, 6, 6.1, 6.2 etc. SDKs and an winget upgrade -all always downloads the newest SxS installer (which already was up to date anyways). My issues included the 6.0.2 vs 6.2 mixup as well. Rinse and repeat on next winget upgrade -all.

Somehow (?!) today this has changed, and I have no idea what actually changed. None of the SDKs are showing up anymore. Just left with the rest of the apps that are already installed (false positives).

> winget -v
v1.2.10271

> pwsh --version
PowerShell 7.2.4

> dotnet --list-sdks
3.1.419 [C:\Program Files\dotnet\sdk]
5.0.100-rc.1.20452.10 [C:\Program Files\dotnet\sdk]
5.0.104 [C:\Program Files\dotnet\sdk]
5.0.214 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]
6.0.105 [C:\Program Files\dotnet\sdk]
6.0.202 [C:\Program Files\dotnet\sdk]
6.0.203 [C:\Program Files\dotnet\sdk]
6.0.300 [C:\Program Files\dotnet\sdk]

> winget upgrade
Name            Id                   Version     Available    Source
--------------------------------------------------------------------
Microsoft Teams Microsoft.Teams      1.4.0.19572 1.5.00.11163 winget
PowerShell      Microsoft.PowerShell 7.2.2.0     7.2.4.0      winget
2 upgrades available.

@denelon
Copy link
Contributor

denelon commented May 19, 2022

@denelon denelon modified the milestones: v1.3-Client, v1.4-Client May 31, 2022
@denelon denelon modified the milestones: v1.4-Client, v1.5-Client Dec 28, 2022
@denelon
Copy link
Contributor

denelon commented Feb 22, 2023

The .NET team has started publishing their manifests.

We still have some work to do to improve the install/upgrade experience related to:

There may also be some other improvements we can make here.

@magicxor
Copy link

magicxor commented Apr 5, 2024

image

This looks very, very wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants