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

Visual C++ needs update every upgrade #3737

Open
geetmankar opened this issue Oct 6, 2023 · 8 comments
Open

Visual C++ needs update every upgrade #3737

geetmankar opened this issue Oct 6, 2023 · 8 comments
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@geetmankar
Copy link

Brief description of your issue

Whenever winget upgrade --all is run, Visual C++ x64 needs to always be upgraded, from the same version number as it was last time before upgrading.

Name                                                                        Id                    Version        Available   Source
-------------------------------------------------------------------------------------------------------------------------------------
Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.36.32532 Microsoft.VCRedist.2015+.x86 14.36.32532.0  14.38.32919.0  winget

image

And the id section shows x86 instead of x64.
Note that this DOES NOT happen when Visual C++ is installed with winget itself (and not from the website)

Steps to reproduce

Expected behavior

  • Show correct, consistent id (x64 when the name is x64)
  • Visual C++ should upgrade to the version it says is available
  • OR, If the version inside Visual C++ metadata is incorrect, that should be fixed

Actual behavior

  • Incorrect, inconsistent id
  • Stays the same version despite upgrading, and asks for upgrade the next time
  • Shows x86 in the id column when the name shows x64

Environment

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

Windows: Windows.Desktop v10.0.22621.2361
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2721.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Oct 6, 2023
@denelon
Copy link
Contributor

denelon commented Oct 6, 2023

How many copies do you have if you run winget list?
You might try uninstalling the extra versions and then see how it behaves.

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Matching Issue related to correlation between installed package and manifest and removed Needs-Triage Issue need to be triaged labels Oct 6, 2023
@denelon
Copy link
Contributor

denelon commented Oct 6, 2023

I believe the issue is in how the installer is reporting the version to the registry. We don't get a specific architecture value from the registry.

@geetmankar
Copy link
Author

geetmankar commented Oct 6, 2023

I removed all versions of visual c++, reinstalled vc++ 2015-2022 x64 from the website and running winget upgrade. The problem came up again.

I also tested winget upgrade without any vc++ dists and winget worked as expected (vc++ didn't come up in the upgrade list).

The problem seems to be specifically with the visual c++ 2015-2022 package on the official visual c++ website.

@geetmankar
Copy link
Author

I believe the issue is in how the installer is reporting the version to the registry. We don't get a specific architecture value from the registry.

I see, should this issue be closed then? Since the issue seems to be with the installer itself?

Maybe the issue can be forwarded to the relevant team. Although it's a relatively minor issue.

@denelon
Copy link
Contributor

denelon commented Oct 8, 2023

I've been working with the VCRuntime team. We've been discussing the nature of the challenge and working towards a permanent solution. It actually looks like a much bigger challenge than I was hoping it would be. I've started engaging with other teams here to discuss other options.

Note: nothing is actually "wrong" with the installer. I'd say it is more of a gap in the set of "standard" metadata written to the registry and could be solved a few different ways.

@ghost
Copy link

ghost commented Oct 17, 2023

I removed all versions of visual c++, reinstalled vc++ 2015-2022 x64 from the website and running winget upgrade. The problem came up again.

I also tested winget upgrade without any vc++ dists and winget worked as expected (vc++ didn't come up in the upgrade list).

The problem seems to be specifically with the visual c++ 2015-2022 package on the official visual c++ website.

I also had same issue.
I resolved this by removing vc using winget by the id provided winget uninstall Microsoft.VCRedist.2015+.x64 winget uninstall Microsoft.VCRedist.2015+.x86and then installing it again usinng winget install Microsoft.VCRedist.2015+.x64 winget install Microsoft.VCRedist.2015+.x86

@ndarilek
Copy link

ndarilek commented Oct 17, 2023

winget install Microsoft.VCRedist.2015+.x64 winget uninstall Microsoft.VCRedist.2015+.x86

Should that last be winget install? Not trying to be pedantic, but this does seem a bit finicky and I want to be sure that the solution isn't uninstalling the x86 version and letting some other mechanism manage it. Might be worth a clarifying edit if so.

Thanks for figuring out a workaround!

@trebuh
Copy link

trebuh commented Nov 14, 2023

I removed all versions of visual c++, reinstalled vc++ 2015-2022 x64 from the website and running winget upgrade. The problem came up again.
I also tested winget upgrade without any vc++ dists and winget worked as expected (vc++ didn't come up in the upgrade list).
The problem seems to be specifically with the visual c++ 2015-2022 package on the official visual c++ website.

I also had same issue. I resolved this by removing vc using winget by the id provided winget uninstall Microsoft.VCRedist.2015+.x64 winget uninstall Microsoft.VCRedist.2015+.x86and then installing it again usinng winget install Microsoft.VCRedist.2015+.x64 winget install Microsoft.VCRedist.2015+.x86

This works! Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Matching Issue related to correlation between installed package and manifest Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants