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

Upgrading Microsoft.DotNet.SDK.7 leaves older version in the system and makes new one not fully visible to winget #2971

Open
przemoc opened this issue Feb 15, 2023 · 6 comments
Labels
Experimental This experimental feature can be enabled in settings Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@przemoc
Copy link

przemoc commented Feb 15, 2023

Brief description of your issue

Upgrading Microsoft.DotNet.SDK.7 via winget (that was in the past also installed via winget) leaves older version in the system and makes new one not fully visible to winget.

Steps to reproduce

Having Microsoft.DotNet.SDK.6 already installed may or may not matter (hard to tell).
Upgrade Microsoft.DotNet.SDK.7 via winget upgrade --all.
(winget upgrade Microsoft.DotNet.SDK.7 would possibly give the same result.)

Expected behavior

Older Microsoft.DotNet.SDK.7 is uninstalled.
Newer Microsoft.DotNet.SDK.7 is installed.
Microsoft.DotNet.SDK.7 remains fully visible/controllable from winget.

Actual behavior

Older Microsoft.DotNet.SDK.7 is not uninstalled.
Newer Microsoft.DotNet.SDK.7 is installed.

http://paste.przemoc.net/winget/WinGet-2023-02-15-11-59-13.872.log - log from winget upgrade --all (I do not have terminal dump as I did not expect issues, so wasn't as cautious as I should be)

image

Microsoft.DotNet.SDK.7 is seemingly not visible from winget.

PS> winget list Microsoft.DotNet.SDK
Name                             Id                     Version Source
-----------------------------------------------------------------------
Microsoft .NET SDK 6.0.406 (x64) Microsoft.DotNet.SDK.6 6.0.406 winget

But shows up in full list:

PS> winget list | findstr Microsoft.DotNet.SDK
Microsoft .NET SDK 7.0.102 (x64)              Microsoft.DotNet.SDK.7                         7.0.102            winget
Microsoft .NET SDK 7.0.200 (x64)              Microsoft.DotNet.SDK.7                         7.0.200            winget
Microsoft .NET SDK 6.0.406 (x64)              Microsoft.DotNet.SDK.6                         6.0.406            winget

And still shows up in upgrade:

PS> winget upgrade
Name                             Id                     Version Available Source
--------------------------------------------------------------------------------
Microsoft .NET SDK 7.0.102 (x64) Microsoft.DotNet.SDK.7 7.0.102 7.0.200   winget
1 upgrades available.

Environment

Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.1265
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Feb 15, 2023
@denelon
Copy link
Contributor

denelon commented Feb 15, 2023

We have an experimental feature to "Uninstall Previous". Run winget features to see if it is enabled. It can be enabled via winget settings.

@denelon denelon added Experimental This experimental feature can be enabled in settings Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Feb 15, 2023
@przemoc
Copy link
Author

przemoc commented Apr 15, 2023

Just wanted to let you know that recently and today I was upgrading Microsoft.DotNet.SDK.6 and Microsoft.DotNet.SDK.7 via winget and there were no remnants of older versions afterward. Not sure what changed since then. I was not enabling any experimental features.

@denelon denelon added this to the v.Next-Client milestone Jun 5, 2023
@przemoc
Copy link
Author

przemoc commented Jun 10, 2023

Correcting my previous statement, because maybe I simply forgot I uninstalled them manually back then, not sure...
Today I did winget upgrade Microsoft.DotNet.SDK.7 while having 7.0.203 and it installed 7.0.302, but old version remained.

PS> winget list | findstr DotNet.SDK.7
Microsoft .NET SDK 7.0.302 (x64)              Microsoft.DotNet.SDK.7                         7.0.302            winget
Microsoft .NET SDK 7.0.203 (x64)              Microsoft.DotNet.SDK.7                         7.0.203            winget

@przemoc
Copy link
Author

przemoc commented Jul 1, 2023

It's like back and forth with this. Today upgrade didn't leave any old .NET afterward, which I also confirmed by looking at Installed apps (or control appwiz.cpl). Not sure if my reports have any value at this point.

PowerShell 7.3.5
PS C:\Users\przemoc> winget upgrade
Name                             Id                     Version  Available Source
---------------------------------------------------------------------------------
Microsoft .NET SDK 7.0.304 (x64) Microsoft.DotNet.SDK.7 7.0.304  7.0.305   winget
MSYS2                            MSYS2.MSYS2            20221216 20230526  winget
Microsoft .NET SDK 6.0.410 (x64) Microsoft.DotNet.SDK.6 6.0.410  6.0.411   winget
3 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
PS C:\Users\przemoc> winget upgrade Microsoft.DotNet.SDK.6
Found Microsoft .NET SDK 6.0 [Microsoft.DotNet.SDK.6] Version 6.0.411
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.411/dotnet-sdk-6.0.411-win-x64.exe
  ██████████████████████████████   197 MB /  197 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Users\przemoc> winget upgrade Microsoft.DotNet.SDK.7
Found Microsoft .NET SDK 7.0 [Microsoft.DotNet.SDK.7] Version 7.0.305
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.305/dotnet-sdk-7.0.305-win-x64.exe
  ██████████████████████████████   202 MB /  202 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Users\przemoc> winget upgrade
Name  Id          Version  Available Source
-------------------------------------------
MSYS2 MSYS2.MSYS2 20221216 20230526  winget
1 upgrades available.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.

@o-l-a-v
Copy link

o-l-a-v commented May 15, 2024

Still a problem, tested with Winget v1.7.11261 and v1.8.1133-preview.

image

However, winget list --id Microsoft.DotNet.SDK.8 only lists the newest version.

image

While winget list shows both versions:

image

Strange. I'll pin Dotnet SDK for now. But would be great with a fix to this.

@PckgrTom
Copy link

Having a similar issue here.

image

@denelon denelon removed this from the v.Next-Client milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experimental This experimental feature can be enabled in settings Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants