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

Winget upgrade --all not updating certain packages when reporting updates available

Open jahvari opened this issue 3 years ago • 16 comments

Brief description of your issue

Here is the output:

PS C:\WINDOWS\system32> winget upgrade --all Name Id Version Available Source

Android Studio Google.AndroidStudio 2021.3.1.16 2021.3.1.17 winget Microsoft .NET SDK 6.0.304 (x64) Microsoft.DotNet.SDK.6 6.0.304 6.0.402 winget JetBrains ETW Host Service (x64) JetBrains.ReSharper 2022.2.2 2022.2.3 winget tuna version 1.8.3 univrsal.tuna 1.8.3 1.8.5 winget Microsoft ASP.NET Core 6.0.9 - Shared Framework (x… Microsoft.DotNet.AspNetCore.6 6.0.9 6.0.10 winget Windows Software Development Kit - Windows 10.0.17… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget Teams Machine-Wide Installer Microsoft.Teams 1.5.0.8070 1.5.00.21668 winget Nefarius Virtual Gamepad Emulation Bus Driver ViGEm.ViGEmBus 1.17.333.0 1.21.442 winget Epic Games Launcher EpicGames.EpicGamesLauncher 1.2.17.0 1.3.23.0 winget Microsoft Visual C++ 2015-2022 Redistributable (x8… Microsoft.VCRedist.2015+.x64 14.32.31332.0 14.34.31823.3 winget Microsoft ASP.NET Core 3.1.29 - Shared Framework (… Microsoft.DotNet.AspNetCore.6 < 6.0.5 6.0.10 winget 11 upgrades available. 4 package(s) have version numbers that cannot be determined. Use "--include-unknown" to see all results.

(1/7) Found Android Studio [Google.AndroidStudio] Version 2021.3.1.17 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://redirector.gvt1.com/edgedl/android/studio/install/2021.3.1.17/android-studio-2021.3.1.17-windows.exe ██████████████████████████████ 912 MB / 912 MB Successfully verified installer hash Starting package install... Successfully installed

(2/7) Found Microsoft .NET SDK 6.0 [Microsoft.DotNet.SDK.6] Version 6.0.402 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Successfully verified installer hash Starting package install... Successfully installed

(3/7) Found Microsoft ASP.NET Core Runtime 6.0 [Microsoft.DotNet.AspNetCore.6] Version 6.0.10 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/aspnetcore/Runtime/6.0.10/aspnetcore-runtime-6.0.10-win-x64.exe ██████████████████████████████ 8.58 MB / 8.58 MB Successfully verified installer hash Starting package install... Successfully installed

(4/7) Found Windows Software Development Kit [Microsoft.WindowsSDK] Version 10.0.22621.1 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://download.microsoft.com/download/f/6/7/f673df4b-4df9-4e1c-b6ce-2e6b4236c802/windowssdk/winsdksetup.exe ██████████████████████████████ 1.32 MB / 1.32 MB Successfully verified installer hash Starting package install... Successfully installed

(5/7) Found Microsoft Teams [Microsoft.Teams] Version 1.5.00.21668 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Successfully verified installer hash Starting package install... Installer failed with exit code: 1638 Installer log is available at: C:\Users\Hunter Johnston\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Microsoft.Teams.1.5.00.21668-2022-10-24-10-27-19.135.log Another version of this application is already installed.

(6/7) Found Epic Games Launcher [EpicGames.EpicGamesLauncher] Version 1.3.23.0 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Successfully verified installer hash Starting package install... Installer failed with exit code: 1603 Installer log is available at: C:\Users\Hunter Johnston\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-EpicGames.EpicGamesLauncher.1.3.23.0-2022-10-24-10-27-20.063.log

(7/7) Found Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VCRedist.2015+.x64] Version 14.34.31823.3 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://download.visualstudio.microsoft.com/download/pr/a16e1596-7fef-4570-8d63-fb9d4e72c820/D0CAFF8097BB9C43A3685686826867506BF6EDD667F7B90092CB0EB1B964A85E/VC_redist.x64.exe ██████████████████████████████ 24.2 MB / 24.2 MB Successfully verified installer hash Starting package install... Successfully installed

17 package(s) have version numbers that cannot be determined. Use "--include-unknown" to see all results.

PS C:\WINDOWS\system32> winget upgrade Name Id Version Available Source

Android Studio Google.AndroidStudio 2021.3.1.16 2021.3.1.17 winget Microsoft .NET SDK 6.0.304 (x64) Microsoft.DotNet.SDK.6 6.0.304 6.0.402 winget JetBrains ETW Host Service (x64) JetBrains.ReSharper 2022.2.2 2022.2.3 winget tuna version 1.8.3 univrsal.tuna 1.8.3 1.8.5 winget Microsoft ASP.NET Core 6.0.9 - Shared Framework (x… Microsoft.DotNet.AspNetCore.6 6.0.9 6.0.10 winget Windows Software Development Kit - Windows 10.0.17… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget Teams Machine-Wide Installer Microsoft.Teams 1.5.0.8070 1.5.00.21668 winget Nefarius Virtual Gamepad Emulation Bus Driver ViGEm.ViGEmBus 1.17.333.0 1.21.442 winget Epic Games Launcher EpicGames.EpicGamesLauncher 1.2.17.0 1.3.23.0 winget Microsoft Visual C++ 2015-2022 Redistributable (x8… Microsoft.VCRedist.2015+.x64 14.32.31332.0 14.34.31823.3 winget Microsoft ASP.NET Core 3.1.29 - Shared Framework (… Microsoft.DotNet.AspNetCore.6 < 6.0.5 6.0.10 winget 11 upgrades available. 4 package(s) have version numbers that cannot be determined. Use "--include-unknown" to see all results.

Steps to reproduce

Using the built in upgrade --all command

Expected behavior

Install the updates to the packages

Actual behavior

It says upgrading on the packages, but the update does not apply.

Environment

Windows Package Manager (Preview) v1.4.2161-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.2006
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.2161.0

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

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

jahvari avatar Oct 24 '22 15:10 jahvari

If you run winget list are you seeing multiple versions of some of these packages installed?

denelon avatar Oct 25 '22 18:10 denelon

@denelon Short answer is no there was not multiple versions, but the best solution was uninstalling the old package first and then running winget install {package name}. Only Microsoft.WindowsSDK package reports an error code and uninstalling and installing it again does not work.

(3/3) Found Windows Software Development Kit [Microsoft.WindowsSDK] Version 10.0.22621.1 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Successfully verified installer hash Starting package install... Installer failed with exit code: 15605

Would uninstalling the packages first and then installing be a better solution to avoid issues?

jahvari avatar Oct 25 '22 23:10 jahvari

Yes, we've confirmed with one of the teams, that the older version needs to be uninstalled. @Trenly just added the "uninstallPrevious" to all the ADK manifests. It looks like we need to do the same thing with the Windows SDK and the other dev kits.

denelon avatar Oct 26 '22 01:10 denelon

I understand from an upgrade perspective, but it's usual for people to have more than one Windows SDK installed since Visual Studio projects can define a specific SDK version to target. I have five(!) currently installed: image

If we uninstall them, Visual Studio will probably prompt the user to reinstall them if they open a project that uses the older SDK, putting them in a loop (a slow loop, since the SDK takes a while to install). I wonder if we should pair this with requiresExplicitUpgrade?

jedieaston avatar Oct 27 '22 12:10 jedieaston

requiresExplicitUpgrade would prevent winget upgrade from showing the SDK as having an upgrade available, and would prevent winget upgrade --all from performing the upgrade action. I think that might be an OK thing to add, but the intent behind requiresExplicitUpgrade was initially to avoid trying to upgrade things that upgrade themselves. I think given the name, it makes sense?

Other thoughts opinions?

denelon avatar Oct 27 '22 18:10 denelon

@Trenly?

jedieaston avatar Oct 28 '22 11:10 jedieaston

I see it both ways. There are users who will want to use --all to upgrade WindowsSDK because they only require the latest. These users will be frustrated if uninstallPrevious is not set, and will also be frustrated if requireExplicitUpgrade is set. Then, as Easton mentioned, there are the users who have workloads with multiple installed. These users likely do not care whether or not the package is upgraded with --all but will be frustrated if uninstallPrevious is set.

There doesn't seem to be a really good path here. I'd look to the WindowsSDK team for guidance, as they should be the experts on their own product. That being said, I don't know they will have any meaningful response / opinion. The true solution here would be better side-by-side support, or even side-by-side pinning

Trenly avatar Oct 28 '22 12:10 Trenly

image

This bug has been around for awhile. This is a duplicate.

pleabargain avatar Nov 01 '22 06:11 pleabargain

Cosa è questo‽

12121989 avatar Nov 01 '22 09:11 12121989

image

This bug has been around for awhile. This is a duplicate.

Bug is still around. I have tried uninstalling visual c++ and reinstalling but winget still keeps returning that V C++ is old and needs an upgrade even though I have tried multiple times to upgrade.

image

pleabargain avatar Nov 15 '22 07:11 pleabargain

@pleabargain when you run winget list are you seeing multiple versions of the Redistributable?

denelon avatar Nov 15 '22 16:11 denelon

Yes. image

winget upgrade image

I have tried deleting via winget but no joy. Please advise.

pleabargain avatar Nov 16 '22 04:11 pleabargain

Bug is still there for c++ c afterupdate stillc

pleabargain avatar Nov 25 '22 07:11 pleabargain

@denelon I was the architect on the Visual Studio Setup team and worked with the Windows SDK and VC teams on these packages. They are actually meant to be installed side-by-side (SxS) within certain version ranges. VC at least appears to be manifested as such, but Windows SDK is not.

image

I found this issue because I can't run winget upgrade --all because of these packages. Upgrading all of them - whether it worked or not - would be destructive for a number of projects, including vswhere that targets an older SDK to be more compatible across supported platforms.

(Also, the pin experimental feature returns "not implemented" when used, but that's a separate issue.)

heaths avatar Feb 03 '23 17:02 heaths

@heaths thanks for sharing! We've been discussing changing the PackageIdentifier for the Windows SDK to "not be an upgrade" by including the versions. That would mean they could be installed side-by-side rather than upgraded. @KevinLaMS is on point for that.

  • https://github.com/microsoft/winget-cli/issues/476 is in progress awaiting review and merge of:
    • https://github.com/microsoft/winget-cli/pull/2813

denelon avatar Feb 03 '23 17:02 denelon

We've been working on the side-by-side scenarios. You could try the latest release and enable the experimental feature on:

  • https://github.com/microsoft/winget-cli/releases/tag/v1.8.924-preview

Please provide feedback at:

  • https://github.com/microsoft/winget-cli/discussions/4281

denelon avatar Apr 02 '24 19:04 denelon

Is this still happening with WinGet 1.8?

denelon avatar Jul 03 '24 21:07 denelon

Hello @jahvari,

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Template: msftbot/noRecentActivity