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

Winget tries to replace Microsoft.WindowsSDK version

Open hansmbakker opened this issue 3 years ago • 10 comments
trafficstars

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

hansmbakker avatar Aug 09 '22 21:08 hansmbakker

I believe these versions should be possible to be installed side-by-side

You're right. So it will be.

Screenshot 2022-08-10 173906

I think he should ignore such packages, not offer to update them.

madgrok avatar Aug 10 '22 14:08 madgrok

Likely every major build should have its own ID, like

  • Microsoft.WindowsSDK.19041
  • Microsoft.WindowsSDK.22621

instead of all sharing the same ID (Microsoft.WindowsSDK) to prevent these updates?

hansmbakker avatar Aug 10 '22 14:08 hansmbakker

After installation, winget will prompt to update the SDK again )

image

madgrok avatar Aug 10 '22 15:08 madgrok

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".

denelon avatar Aug 10 '22 19:08 denelon

I think this work is going to be part of:

  • https://github.com/microsoft/winget-cli/issues/2129

denelon avatar Aug 10 '22 19:08 denelon

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.

BartmanAbyss avatar Aug 26 '22 10:08 BartmanAbyss

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.

skarai avatar Sep 03 '22 18:09 skarai

Same issue here, still annoying

citron avatar Oct 08 '22 10:10 citron

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.

image

o-l-a-v avatar Oct 13 '22 11:10 o-l-a-v

winget upgrade fails to install Microsoft.WindowsSDK

image

pleabargain avatar Oct 21 '22 06:10 pleabargain

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.

ryfu-msft avatar Nov 09 '23 18:11 ryfu-msft