microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.82k stars 1.42k forks source link

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

Open jaliyaudagedara opened 1 month ago

jaliyaudagedara commented 1 month ago

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
github-actions[bot] commented 1 month ago

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.

stephengillie commented 1 month ago

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.

sba923 commented 3 days ago

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.