winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

.NET SDK (Microsoft.dotnet) installs wrong version

Open bc3tech opened this issue 2 years ago • 10 comments

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

bc3tech avatar Apr 19 '22 15:04 bc3tech

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

bc3tech avatar Apr 19 '22 15:04 bc3tech

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 avatar Apr 19 '22 17:04 denelon

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

bc3tech avatar Apr 19 '22 17:04 bc3tech

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.

denelon avatar Apr 19 '22 17:04 denelon

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?

bc3tech avatar Apr 19 '22 20:04 bc3tech

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.

denelon avatar Apr 19 '22 21:04 denelon

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.

devbeard avatar May 19 '22 09:05 devbeard

Referencing:

  • microsoft/winget-pkgs/issues/60134
  • dotnet/core/issues/7428

denelon avatar May 19 '22 16:05 denelon

The .NET team has started publishing their manifests.

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

  • https://github.com/microsoft/winget-cli/issues/2995

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

denelon avatar Feb 22 '23 16:02 denelon

image

This looks very, very wrong

magicxor avatar Apr 05 '24 21:04 magicxor