Winget upgrade --all not updating certain packages when reporting updates available
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
If you run winget list are you seeing multiple versions of some of these packages installed?
@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?
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.
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:

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?
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?
@Trenly?
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

This bug has been around for awhile. This is a duplicate.
Cosa è questo‽
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.

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

winget upgrade

I have tried deleting via winget but no joy. Please advise.
Bug is still there for c++

@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.
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 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
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
Is this still happening with WinGet 1.8?
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