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
23.17k stars 1.45k forks source link

Winget upgrade shows XNARedist 3.1.10527.0 to be upgraded to 4.0.30901.0, but installation is actually meant to be side-by-side #1831

Open ghost opened 2 years ago

ghost commented 2 years ago

Brief description of your issue

I have both XNA redist 3.1 and 4.0 installed (both as "refresh"). They are meant to be installed side-by-side, as 4.0 is not a simple upgrade of 3.1.

However, "winget upgrade" always shows the installed xnaredist to be upgraded to 4.0 (and will try to do so), and does not take into account that:

  1. Version 4.0.30901.0 is actually already installed on the machine,
  2. The two versions are meant for side-by-side installation.

Steps to reproduce

Install XNAredist 3.1 refresh (from any source, winget or manually). Install XNAredist 4.0 refresh (from any source, winget or manually).

Run winget upgrade. It will (unsuccessfully) attempt to install xnaredeist 4.0 again and again to "upgrade" 3.1 to 4.0.

Expected behavior

  1. Winget should know which versions are "upgrade paths", and which versions and meant for side-by-side installation, especially for Microsoft redistributables.

  2. (Even better, for any generic software): winget should detect that the "available" version in in fact already installed on the machine, and suppress the output (or at least should not attempt to download and install an already installed version).

Actual behavior

Winget works "line by line" and sees that XNAredist 3.1 has a 4.0 available remote, and blindly tries to download and install.

Environment

Windows Package Manager v1.1.13405
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19044.1415
Paket: Microsoft.DesktopAppInstaller v1.16.13405.0

Protokolle: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
denelon commented 2 years ago

If 3.x and 4.x are to be treated as different packages, they should likely be broken into two packages from a manifest perspective. This could also cause users to not be made aware version 4.x or newer is available if they have 3.x installed.

We need to look into mechanisms to show users when newer "side by side" versions are available.

denelon commented 6 months ago

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

Please provide feedback at:

soredake commented 6 months ago

No change for me with this new preview version and sideBySide set to true.