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

未关闭
#6,666 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp
领域
backend, cli

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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é
主要语言
C++
星标
26.6k
派生
1.8k
平均合并
3 天 10 小时
30 天内合并 PR
41

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/winget-cli 的其他 Issue

查看 microsoft/winget-cli 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。