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

Uninstall before VC++2015-2022 before upgrading #58746

Closed

Conversation

felipecrs
Copy link
Contributor

@felipecrs felipecrs commented Apr 25, 2022

Otherwise winget upgrade will always flag as outdated, because the older package will be still there.

  • Have you signed the Contributor License Agreement?
  • Have you checked that there aren't other open pull requests for the same manifest update/change?
  • Have you validated your manifest locally with winget validate --manifest <path>?
  • Have you tested your manifest locally with winget install --manifest <path>?
  • Does your manifest conform to the 1.1 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.


Otherwise, the old version is kept installed (since multiple versions of it can be installed at the same time), and therefore, winget upgrade always flags the package as outdated unless the user manually uninstalls it.

I can confirm and reproduce this behavior for the VC++2015-2022 packages, and although I believe this can also be the case for other variants of it, I didn't try to reproduce it.

Microsoft Reviewers: Open in CodeFlow

Otherwise winget upgrade will always flag as outdated, because the older package will be still there.
@wingetbot
Copy link
Collaborator

Service Badge  Service Badge  

@wingetbot
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wingetbot wingetbot added the PullRequest-Error PR is Invalid label Apr 25, 2022
@ghost
Copy link

ghost commented Apr 25, 2022

Hello @felipecrs,
The package manager bot determined there was an issue with the pull request. Make sure the manifest files are under the manifests\partition\publisher\appname\version directory. The partition of the path must be the first letter of the publisher in lower-case.

Example:
Path: manifests / m / Microsoft / WindowsTerminal / 1.6.10571.0 / WindowsTerminal.yaml

For details on the error, see the details link below in the build pipeline.

You may also try the Windows Package Manager Manifest Creator

@ghost ghost added the Needs-Author-Feedback This needs a response from the author. label Apr 25, 2022
@OfficialEsco
Copy link
Contributor

OfficialEsco commented Apr 25, 2022

I don't understand this issue, i've checked and regularly updated VC++2019 and 2022 via WinGet and it always removes the old version (pre 2015 does not uninstall old version tho)
But maybe its safer to do it this way since we do have complains about it all the time.. although i believe most are caused by the regex matching

Can you please explain the reproduce steps?

edit: i also believe VC++ got a upgrade switch that we are missing, the /install switch might be causing it to not remove the old version at times

@felipecrs
Copy link
Contributor Author

felipecrs commented Apr 25, 2022

@OfficialEsco you are actually very right!

The issue is because winget is detecting my x86 VC++ 2015-2022 package as the x64 one during upgrade.

That must be the reason why the old version never gets uninstalled/upgraded, because Winget is trying to upgrade x64 variant while it should upgrade the x86 one.

CDViewer_2iajaVpRTE.mp4

However, I cannot reproduce it in Sandbox.

What do you suggest as a way forward, an issue in the winget-cli repo?

@felipecrs felipecrs closed this Apr 25, 2022
@ghost ghost added Needs-Attention This work item needs to be reviewed by a member of the core team. and removed Needs-Author-Feedback This needs a response from the author. labels Apr 25, 2022
@felipecrs felipecrs deleted the uninstall-vcredist-previous branch April 25, 2022 17:24
@OfficialEsco
Copy link
Contributor

Oke good so i'm not that crazy yet, what version of winget-cli are you running on your host and in sandbox?
I've not experienced this issue in a long time, so i believe its fixed in winget-cli version 1.3, it will also be even more improved once it accepts all the ARP fields

AppsAndFeaturesEntries:
- Publisher: Microsoft Corporation
DisplayName: Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.32.31326
DisplayVersion: 14.32.31326.0
InstallerType: burn
ProductCode: '{2d507699-404c-4c8b-a54a-38e352f32cdd}'

@felipecrs
Copy link
Contributor Author

felipecrs commented Apr 25, 2022

Understood. I will check if I'm running Winget 1.3 in the affected environment, but, sadly, I installed the latest version of x86 variant by myself and now I cannot reproduce the issue anymore.

I tried to uninstall the latest version and install the outdated one, and now it detects as the proper package.

Anyway, if this issue comes back, I will let you know with more meaningful information. Thanks a lot so far!

@denelon
Copy link
Contributor

denelon commented Apr 25, 2022

@felipecrs
It looks like you're not the only one with that experience:
microsoft/winget-cli#1413 (comment)

@felipecrs
Copy link
Contributor Author

Hi @denelon, thanks for following up. But I don't believe it's the same situation. In my environment, I didn't have any broken or corrupted installation, nor I had any duplicated version installed. What I had was:

  • VC++ 2015-2022 x86 version 14.30.x.x (outdated)
  • VC++ 2015-2022 x64 version 14.32.x.x (up to date)

And still Winget detected the x64 variant as outdated with the version from the x86 one.

I unfortunately didn't show all the versions installed in my quick demo, but I remember that well. Anyway, if I ever get able to reproduce the issue again, I will be happy to provide more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Attention This work item needs to be reviewed by a member of the core team. PullRequest-Error PR is Invalid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants