[Package Issue] Microsoft.VisualStudio.2022.BuildTools: Upgrade fails with exit code 1

Open
#6,666 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the failure with winget upgrade Microsoft.VisualStudio.2022.BuildTools and inspect the version table showing installer version 4.11.24.2075 beside product version 17.14.44. The issue does not identify a source file or test, so trace how WinGet detects installed and available versions for this package and how it invokes the upgrade installer. Done means the versions are handled without confusion and the upgrade completes with exit code 0.

Written by the indexing model from the issue text.

Description

Command-Upgrade Issue-Bug
Relevant area(s)

WinGet CLI

Relevant command(s)

winget upgrade

Brief description of your issue

Microsoft.VisualStudio.2022.BuildTools displays a version mismatch/confusion (showing installer version 4.x alongside product version 17.x). When attempting to upgrade, the installation fails with exit code 1.

Steps to reproduce
  1. Open PowerShell or Command Prompt.
  2. Run winget upgrade (or target the package directly: winget upgrade Microsoft.VisualStudio.2022.BuildTools).
  3. Observe the output version details and the resulting installation failure.
Expected behavior
  • Winget should correctly interpret the installed vs available versions of Visual Studio Build Tools without version conflicts.
  • The upgrade process should execute and complete successfully with exit code 0.
Actual behavior
  • Version table displays mixed versions:
    Microsoft Visual Studio Installer Microsoft.VisualStudio.2022.BuildTools 4.11.24.2075 17.14.44
    
    
Environment
Gestionnaire de package Windows v1.29.380
© 2026 Microsoft. Tous droits réservés.

Windows: Windows.Desktop v10.0.26300.9818
Architecture du système : X64
Package : Microsoft.DesktopAppInstaller v1.29.380.0

Répertoires de WinGet
-----------------------------------------------------------------------------------------------------------------------
Journaux                                     %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Local…
Paramètres utilisateurs                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\Local…
Répertoire des liens portables (utilisateur) %LOCALAPPDATA%\Microsoft\WinGet\Links
Répertoire des liens portables (ordinateur)  C:\Program Files\WinGet\Links
Racine de package portable (utilisateur)     %LOCALAPPDATA%\Microsoft\WinGet\Packages
Racine du package portable                   C:\Program Files\WinGet\Packages
Racine de package portable (x86)             C:\Program Files (x86)\WinGet\Packages
Téléchargements du programme d’installation  D:\Users\me\Downloads
Modules de configuration                     %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Liens
---------------------------------------------------------------------------------------------
Déclaration de confidentialité        https://aka.ms/winget-privacy
Contrat de licence                    https://aka.ms/winget-license
Avis de tiers                         https://aka.ms/winget-3rdPartyNotice
Page d’accueil                        https://aka.ms/winget
Conditions générales du Windows Store https://www.microsoft.com/en-us/storedocs/terms-of-sale

Paramètre administrateur                  État
---------------------------------------------------
LocalManifestFiles                        Désactivé
BypassCertificatePinningForMicrosoftStore Désactivé
InstallerHashOverride                     Désactivé
LocalArchiveMalwareScanOverride           Désactivé
ProxyCommandLineOptions                   Désactivé
ConfigurationProcessorPath                Désactivé
DefaultProxy                              Désactivé
Dominant language
C++
Stars
26.6k
Forks
1.8k
Avg merge
3d 10h
Merged PRs (30d)
41

Getting set up

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.

More from microsoft/winget-cli

All issues in microsoft/winget-cli

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.