Open denelon opened 3 years ago
In this scenario, the previous installer was a .exe installer and the new version is an MSI. For this scenario, we may need to add a new key to the manifest to indicate what has happened at the transition. Maybe we should uninstall the previous version and install the new MSI version. More examples would help to determine if this is the correct behavior, or if we're going to need to support additional behaviors in the client. I believe in this case you may be able to:
winget upgrade Cryptomancer.Cryptomancer --force
An uninstall of the prior exe version was required to allow install of the new msi version. Running the new msi version indicated the uninstall requirement.
@MagicFirefly, I'm not sure about what the code path would do today. It's worth trying to add the upgrade behavior as "uninstallPrevious" for the new MSI version of the package.
Related to:
I experienced this issue today with Microsoft Edge. Log is attached
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\WINDOWS\system32> winget upgrade
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Microsoft Edge Microsoft.Edge 95.0.1020.40 95.0.1020.44 winget
Microsoft 365 Apps for enterprise Microsoft.Office 16.0.14326.20508 16.0.14527.20234 winget
2 upgrades available.
PS C:\WINDOWS\system32> winget upgrade Microsoft.Edge
No applicable update found.
PS C:\WINDOWS\system32> winget upgrade --id Microsoft.Edge
No applicable update found.
PS C:\WINDOWS\system32> winget show Microsoft.Edge
Found Microsoft Edge [Microsoft.Edge]
Version: 95.0.1020.44
Publisher: Microsoft Corporation
Publisher Url: https://www.microsoft.com/en-US/
Publisher Support Url: https://support.microsoft.com/en-US/
Author: Microsoft Corporation
Moniker: msedge
Description: World-class performance with more privacy, more productivity, and more value while you browse.
Homepage: https://www.microsoft.com/en-us/edge
License: MIT License
License Url: https://www.microsoft.com/en-us/servicesagreement/
Privacy Url: https://privacy.microsoft.com/en-US/privacystatement
Copyright: Copyright (C) Microsoft Corporation
Copyright Url: https://www.microsoft.com/en-us/servicesagreement/
Installer:
Type: Msi
Download Url: https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/93862b4a-15ae-40a0-b501-f969633661e2/MicrosoftEdgeEnterpriseX64.msi
SHA256: 7f0e61839f618d9e09c487e9e66755ee2094a31fd4bf83973c6b044e238ed745
PS C:\WINDOWS\system32> winget --info
Windows Package Manager v1.1.12653
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19043.1288
Package: Microsoft.DesktopAppInstaller v1.16.12653.0
Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
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
I'm having this same issue with PowerToys and Thunderbird. I installed them both using winget. At the very least, we should keep things consistent within the ecosystem. I understand if somebody installs using an external method and it doesn't find applicable updates.
@cotsuka
I experienced the same. I commented here: https://github.com/microsoft/winget-pkgs/pull/36499#issuecomment-983378039
Got redirected to this existing issue: #752.
Found out that a workaround for now is to just use winget install --id <package_identifier>
for such cases. So when automating winget upgrade with PowerShell, I now have a list of identifiers where I use install rather than upgrade. It's jank, but at least I can leverage Winget to upgrade most of my applications. Example:
Yup, just reposting here for readability (from #1928 ), I ran into this same issue with StefansTools.grepWin
.
@denelon - Perhaps we can add better messaging around trying to uninstall previous, especially now that #2755 is experimental? Not sure if the uninstall previous arg would bypass this error though
I'm not sure if WinGet has enough information to provide the right hint to the user.
Maybe it would make sense to have some documentation at Microsoft Learn to help provide some hints as to why certain error messages are presented.
I'm sure there are edge cases where the hints might not be correct, but I would prefer to help users fall into the "pit of success".
What were you thinking for better messaging @Trenly?
It might be related to:
I'm not sure if WinGet has enough information to provide the right hint to the user.
Maybe it would make sense to have some documentation at Microsoft Learn to help provide some hints as to why certain error messages are presented.
I'm sure there are edge cases where the hints might not be correct, but I would prefer to help users fall into the "pit of success".
What were you thinking for better messaging @Trenly?
There's 3 types of error that can lead to no applicable upgrade (at least from what I see in the code), and I'm sort of guessing at these, since I'm not quite familiar with that section of the workflow yet.
Currently, there are only 2 messages during the upgrade flow -
My thoughts are twofold 1) Perhaps the messaging could be improved as to why no applicable upgrade was found. What filters made it un-upgradeable?
That sounds like a great improvement!
[Policy] Command-Upgrade
Originally posted by @MagicFirefly in https://github.com/microsoft/winget-cli/issues/1191#issuecomment-950047548