microsoft / microsoft/winget-cli

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

Open
#1,831 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature Side-by-Side
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the winget upgrade flow described in the reproduction and trace how installed XNAredist 3.1 is compared with the available 4.0. Review the upgrade decision and package metadata involved, then verify that an already-installed 4.0 is not offered or attempted as an upgrade while 3.1 remains installed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.