winget-cli
winget-cli copied to clipboard
Winget tries to replace Microsoft.WindowsSDK version
Brief description of your issue
Winget tries to upgrade Microsoft.WindowsSDK from build 19041 to build 22621 in-place while I believe these versions should be possible to be installed side-by-side. Otherwise, the user will be forced to retarget their development projects.
Name Id Version Available Source
--------------------------------------------------------------------------------------------------------------------------------
Windows Software Development Kit - Windows 10.0.19041.685 Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Steps to reproduce
- Install
Microsoft.WindowsSDK- version 19041 (e.g. as part of Visual Studio). - run
winget upgrade --all
Expected behavior
Microsoft.WindowsSDK having separate packages for major builds.
Having in-place revision updates is allright, but major build updates is not.
Actual behavior
Winget tries to upgrade Microsoft.WindowsSDK from build 19041 to build 22621 in-place
Environment
Windows Package Manager v1.3.2091
Windows: Windows.Desktop v10.0.22000.795
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2091.0
I believe these versions should be possible to be installed side-by-side
You're right. So it will be.
I think he should ignore such packages, not offer to update them.
Likely every major build should have its own ID, like
Microsoft.WindowsSDK.19041Microsoft.WindowsSDK.22621
instead of all sharing the same ID (Microsoft.WindowsSDK) to prevent these updates?
After installation, winget will prompt to update the SDK again )

We don't check for an installed version of a package before we offer an upgrade yet. It's in progress for the 1.4 release. Running winget list after running upgrade will help confirm if the new version was installed side by side. After that running winget upgrade again will likely still show the upgrade to the older package is available if the versions are under the same "package".
I think this work is going to be part of:
- https://github.com/microsoft/winget-cli/issues/2129
Also, if I may add to this, although I alread have SDK 10.0.22621.1 installed, winget upgrade shows this (even after running winget upgrade --all)
Name Id Version Available Source
-----------------------------------------------------------------------------------------------------------------------
Windows Terminal Preview Microsoft.WindowsTerminal.Preview 1.15.2003.0 1.15.2282.0 winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Microsoft Windows Desktop Runtime - 3.1.27 (… Microsoft.DotNet.DesktopRuntime.3_1 3.1.27 3.1.28 winget
EA app ElectronicArts.EADesktop 12.0.161.5041 12.0.244.5244 winget
Microsoft ASP.NET Core 3.1.27 - Shared Frame… Microsoft.DotNet.AspNetCore.3_1 3.1.27 3.1.28 winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Windows Software Development Kit - Windows 1… Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
Microsoft .NET SDK 6.0.303 (x64) Microsoft.DotNet.SDK.6 6.0.303 6.0.400 winget
11 upgrades available.
only thing that helps is uninstalling the old SDK, but I can't do that.
I am seeing this - trying to update both versions (using Winget version v1.4.2161-preview) Windows Software Development Kit - Windows 10.0.22000.194 Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget Windows Software Development Kit - Windows 10.0.19041.685 Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget 2 upgrades available.
Same issue here, still annoying
Related, I think. I have .NET Desktop Runtime v6.x installed, then run following command to check if an update to v5.x is available:
winget list --exact --id Microsoft.DotNet.DesktopRuntime.5 --silent --source winget --accept-source-agreements
Results, winget says v6.x is a newer version of v5.x.

winget upgrade fails to install Microsoft.WindowsSDK

This issue has been resolved now that Microsoft.WindowsSDK has been separated into different packages based on their version. Related PR: https://github.com/microsoft/winget-pkgs/pull/108553
When running winget list or winget upgrade, verified that these packages are listed separated and show the correct available version corresponding to that package.