-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Conversation
Otherwise winget upgrade will always flag as outdated, because the older package will be still there.
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hello @felipecrs, Example: For details on the error, see the details link below in the build pipeline. You may also try the Windows Package Manager Manifest Creator |
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) 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 |
@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.mp4However, I cannot reproduce it in Sandbox. What do you suggest as a way forward, an issue in the winget-cli repo? |
Oke good so i'm not that crazy yet, what version of winget-cli are you running on your host and in sandbox? Lines 24 to 29 in d65be50
|
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! |
@felipecrs |
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:
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. |
Otherwise winget upgrade will always flag as outdated, because the older package will be still there.
winget validate --manifest <path>
?winget install --manifest <path>
?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