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

Microsoft .NET SDK: Upgrade installs the packages, but still says updates are available

Open jaliyaudagedara opened this issue 1 year ago • 7 comments

Brief description of your issue

winget upgrade shows some Microsoft .NET SDK updates as available. Installed them using winget upgrade --all. Once installation is completed when running winget upgrade still shows updates.

image

NOTE: This is only happening for Microsoft .NET SDK

PS C:\Users\Jaliya> winget list dotnet
Name                                                   Id                                  Version                   Available Source
-------------------------------------------------------------------------------------------------------------------------------------
PowerShell 7-x64                                       Microsoft.PowerShell                7.4.3.0                             winget
PowerShell 7.3.1.0-x64                                 Microsoft.PowerShell                7.3.1.0                             winget
Microsoft .NET SDK 9.0.100-preview.5.24307.3 (x64)     Microsoft.DotNet.SDK.Preview        9.0.100-preview.5.24307.3           winget
Microsoft .NET SDK 8.0.206 (x64)                       Microsoft.DotNet.SDK.8              8.0.206                   8.0.302   winget
Microsoft .NET SDK 8.0.302 (x64)                       Microsoft.DotNet.SDK.8              8.0.302                             winget
Microsoft .NET SDK 8.0.106 (x64)                       Microsoft.DotNet.SDK.8              8.0.106                             winget
Microsoft .NET SDK 7.0.317 (x64)                       Microsoft.DotNet.SDK.7              7.0.317                   7.0.410   winget
Microsoft .NET SDK 7.0.410 (x64)                       Microsoft.DotNet.SDK.7              7.0.410                             winget
Microsoft .NET SDK 7.0.203 (x64)                       Microsoft.DotNet.SDK.7              7.0.203                             winget
Microsoft .NET SDK 7.0.120 (x64)                       Microsoft.DotNet.SDK.7              7.0.120                             winget
Microsoft .NET SDK 6.0.321 (x64)                       Microsoft.DotNet.SDK.6              6.0.321                   6.0.423   winget
Microsoft .NET SDK 6.0.423 (x64)                       Microsoft.DotNet.SDK.6              6.0.423                             winget
Microsoft .NET SDK 6.0.203 (x64)                       Microsoft.DotNet.SDK.6              6.0.203                             winget
Microsoft .NET SDK 5.0.408 (x64)                       Microsoft.DotNet.SDK.5              5.0.408                             winget
Microsoft .NET Core SDK 3.1.426 (x64)                  Microsoft.DotNet.SDK.3_1            3.1.426                             winget
Microsoft .NET Core SDK 2.2.207 (x64)                  Microsoft.DotNet.SDK.3_1            < 3.1.419                           winget
Microsoft .NET Runtime - 6.0.31 (x64)                  Microsoft.DotNet.Runtime.6          6.0.31                              winget
Microsoft .NET Core Runtime - 3.1.32 (x64)             Microsoft.DotNet.Runtime.3_1        3.1.32                              winget
Microsoft .NET Core Runtime - 2.1.30 (x64)             Microsoft.DotNet.Runtime.3_1        < 3.1.25                            winget
Microsoft Windows Desktop Runtime - 6.0.31 (x64)       Microsoft.DotNet.DesktopRuntime.6   6.0.31                              winget
Microsoft Windows Desktop Runtime - 5.0.17 (x86)       Microsoft.DotNet.DesktopRuntime.5   5.0.17                              winget
Microsoft Windows Desktop Runtime - 3.1.32 (x86)       Microsoft.DotNet.DesktopRuntime.3_1 3.1.32                              winget
Microsoft ASP.NET Core 5.0.17 - Shared Framework (x86) Microsoft.DotNet.AspNetCore.5       5.0.17                              winget
Microsoft ASP.NET Core 3.1.32 - Shared Framework (x86) Microsoft.DotNet.AspNetCore.3_1     3.1.32                              winget

Steps to reproduce

winget upgrade
winget upgrade --all
winget upgrade

Expected behavior

Once updates are installed, it shouldn't be displayed again as available.

Actual behavior

Once updates are installed, still it displays updates are available.

Environment

PS C:\Users\Jaliya> winget --info
Windows Package Manager v1.8.1791
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.3810
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1791.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

jaliyaudagedara avatar Jul 03 '24 09:07 jaliyaudagedara

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Jul 03 '24 09:07 github-actions[bot]

Since this is only happening to 1 package, it should probably be moved to the winget-pkgs repo. This appears to be the "upgrade always available" scenario, which is frequently due to sorting or matching issues.

stephengillie avatar Jul 03 '24 15:07 stephengillie

This affects at least both Microsoft.DotNet.SDK.7 and Microsoft.DotNet.SDK.6.

IMVHO winget should improve its handling of packages where multiple versions can be installed side-by-side: if versions X and Y are both installed, and the manifest for Y says that version X can be updated to version Y, then winget update should not report that the upgrade from X to Y is available, given that version Y is already installed next to version X.

sba923 avatar Aug 15 '24 09:08 sba923

Now it affects also Microsoft.DotNet.SDK.9

eabase avatar Feb 17 '25 07:02 eabase

it exists also for version (9.0.300)

PS C:\Users\e03476> winget upgrade Name Id Version Available Source

Microsoft .NET SDK 9.0.106 (x64) Microsoft.DotNet.SDK.9 9.0.106 9.0.300 winget

PS C:\Users\e03476> winget upgrade --id Microsoft.DotNet.SDK.9 -s winget Found Microsoft .NET SDK 9.0 [Microsoft.DotNet.SDK.9] Version 9.0.300 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://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.300/dotnet-sdk-9.0.300-win-x64.exe ██████████████████████████████ 217 MB / 217 MB Successfully verified installer hash Starting package install... Successfully installed

PS C:\Users\e03476> winget upgrade Name Id Version Available Source

Microsoft .NET SDK 9.0.106 (x64) Microsoft.DotNet.SDK.9 9.0.106 9.0.300 winget

lakani avatar May 22 '25 08:05 lakani

Yes, very annoying you are not able to fix this.

Is there a reason why this is not getting fixed? (It seem to only affect .NET SDK.)

eabase avatar May 22 '25 22:05 eabase

I have experienced this issue as well. Examples: (1) It keeps trying to upgrade from an old version of .NET 9 SDK to a slightly less old version, which completes, but then will try again if I run winget update --all immediately after, it never moves me to the most recent .NET 9 SDK. (2) Same with .NET 10 SDK preview, it kept telling me there was an upgrade from preview 3 to 4, kept trying to upgrade, it would successfully complete, but then here again would try again if I run winget update --all again. It did so even after even after preview 5 became available.

sirredbeard avatar Jun 13 '25 16:06 sirredbeard

Image

This is very annoying. It keeps installing the same version again and again.

SCS-Technik avatar Nov 10 '25 08:11 SCS-Technik