Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doesn't work for Visual Studio 2022 #2165

Closed
NN--- opened this issue May 18, 2022 · 14 comments
Closed

Update doesn't work for Visual Studio 2022 #2165

NN--- opened this issue May 18, 2022 · 14 comments
Labels
Area-External Issue outside of winget-cli source Help-Wanted We encourage anyone to jump on these. Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@NN---
Copy link

NN--- commented May 18, 2022

Brief description of your issue

WinGet fails upgrading Visual Studio and then cannot continue with upgrades.

Steps to reproduce

Install Visual Studio 2022 17.2.0

Found Visual Studio Enterprise 2022 [Microsoft.VisualStudio.2022.Enterprise] Version 17.2.1
(1/1) Found Visual Studio Enterprise 2022 [Microsoft.VisualStudio.2022.Enterprise] Version 17.2.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.visualstudio.microsoft.com/download/pr/05734053-383e-4b1a-9950-c7db8a55750d/98dcfd76797e262c8c40b100ce3de93a65c2dd9e0ba6cba2e2a1c928a8658eef/vs_Enterprise.exe
  ██████████████████████████████  1.60 MB / 1.60 MB
Successfully verified installer hash
Starting package install...
Installer failed with exit code: 1

Expected behavior

Upgrade works

Actual behavior

Upgrade fails

Environment

Windows Package Manager v1.2.10271
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.675
Package: Microsoft.DesktopAppInstaller v1.17.10271.0
@ghost ghost added the Needs-Triage Issue need to be triaged label May 18, 2022
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-External Issue outside of winget-cli source Help-Wanted We encourage anyone to jump on these. and removed Needs-Triage Issue need to be triaged labels May 18, 2022
@denelon
Copy link
Contributor

denelon commented May 18, 2022

Can you run the command with "--verbose-logs" and share the output?

@denelon denelon added the Needs-Author-Feedback Issue needs attention from issue or PR author label May 18, 2022
@NN---
Copy link
Author

NN--- commented May 18, 2022

I have already updated manually.
Probably will happen during the next update.

@ghost ghost added Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels May 18, 2022
@jedieaston
Copy link
Contributor

This happens if you don't run winget with admin, the Visual Studio installer won't elevate for an upgrade by itself.

We may need a upgradeElevationRequirement (if there's other apps that do this besides VS, otherwise they should make it try to elevate on upgrade).

@Trenly
Copy link
Contributor

Trenly commented May 19, 2022

This happens if you don't run winget with admin, the Visual Studio installer won't elevate for an upgrade by itself.

We may need a upgradeElevationRequirement (if there's other apps that do this besides VS, otherwise they should make it try to elevate on upgrade).

Or perhaps #2062

@jedieaston
Copy link
Contributor

I like the solution you proposed! Since upgrade is a different mode for switches it makes sense to have a different ElevationRequirement for it.

@sba923
Copy link

sba923 commented May 23, 2022

Same issue here (even from an elevated shell). Seems to have started with VS2022 v17.2.

image

winget fails to upgrade VS2022 - 202205231038.zip

@jedieaston
Copy link
Contributor

jedieaston commented May 24, 2022

Was VS running when you tried to upgrade? Long shot, but I've seen it error out for that too.

@sba923
Copy link

sba923 commented May 24, 2022

Was VS running when you tried to upgrade? Long shot, but I've seen it error out for that too.

No, VS wasn't running.

@jedieaston
Copy link
Contributor

Related: microsoft/winget-pkgs#32921

@GNQG
Copy link

GNQG commented Jun 2, 2022

I encountered almost same problem on Microsoft.VisualStudio.2022.BuildTools.
I found manifests for version >= 17.2.0 aims to installers for LTSC 17.2 Channel, not Current Channel (See this.)
I guess upgrading from Current Channel to LTSC Channel causes some problems.

@jedieaston
Copy link
Contributor

That's my fault, I have a script that updates Visual Studio but it wasn't grabbing the right links for Enterprise/Build Tools/Professional. Let me fix it...

@denelon
Copy link
Contributor

denelon commented Jun 2, 2022

Is this resolved?

@sba923
Copy link

sba923 commented Jun 2, 2022

Is this resolved?

Yes -- at least on my current machine --, thanks @jedieaston for the fix!

image

image

BTW, are we supposed to be able to keep the VS2017 Build Tools up-to-date using winget upgrade?

@denelon
Copy link
Contributor

denelon commented Jun 2, 2022

@sba923 I didn't see an entry for Visual Studio Build Tools 2017. It's possible they just haven't been submitted yet. You may request them.

@denelon denelon closed this as completed Jun 2, 2022
@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
@denelon denelon removed the Needs-Attention Issue needs attention from Microsoft label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Issue outside of winget-cli source Help-Wanted We encourage anyone to jump on these. Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

6 participants