microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.41k stars 1.46k forks source link

Side-by-Side installations #4290

Open doterik opened 8 months ago

doterik commented 8 months ago

Description of the new feature / enhancement

When there are side-by-side installations, the lower version still shows 'upgrades available'.

winget upgrade
Name                                          Id                                  Version Available Source
----------------------------------------------------------------------------------------------------------
Microsoft SQL Server Management Studio - 19.3 Microsoft.SQLServerManagementStudio 19.3    20.0      winget
1 upgrades available.

I have both versions installed:

winget list
Name                                          Id                                     Version      Available Source
------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server Management Studio - 20.0 Microsoft.SQLServerManagementStudio    20.0                   winget
Microsoft SQL Server Management Studio - 19.3 Microsoft.SQLServerManagementStudio    19.3         20.0      winget
. . .

Proposed technical implementation details

If the suggested upgrade is installed, there are no upgrades available.

If there will be a 19.4+ version, then it should be flagged.

stephengillie commented 8 months ago

Sometimes, software packages which can be installed side-by-side are put into separate PacakgeIdentifiers, to help communicate this capability. Should this be done here?

doterik commented 8 months ago

@stephengillie

Sometimes, software packages which can be installed side-by-side are put into separate PacakgeIdentifiers, to help communicate this capability. Should this be done here?

I don't know that much about PacakgeIdentifiers but you can't upgrade version 19 to version 20, they will always install as a new application (side-by-side if you have an older version installed).

Installing SSMS 20 doesn't upgrade or replace SSMS 19.x and earlier versions.

doterik commented 8 months ago

@stephengillie It's a bit annoying to always get the notification that there are upgrades available. Also, if you run the command winget upgrade --all, you'll end up in a constant loop.

On the other hand, I like to be informed that there is a newer version than 19, but once I have installed version 20, I don't want version 19 (if I decide to keep that version for a while) to remind me again because version 20 is now installed...
Trenly commented 8 months ago

@doterik - Is there any user information that would be lost if version 19 would be uninstalled before version 20 gets installed?

doterik commented 8 months ago

@Trenly Yes, there are. If you use a good uninstaller your user preferences in the IDE will be lost (SQL servers to connect to, window sizes, and such):

image

Databases, scripts et cetera are kept intact and not removed or deleted. Much the same if you uninstall Notepad++, or whatever, then you have to configure your user preferences again (no files will disappear). But, if you first install the new version of SSMS you get a question to copy/migrate your old configuration. Nota bene, your databases, projects, and scripts will always remain intact.

denelon commented 8 months ago

We are currently working on enhancements for side-by-side scenarios in the preview branch. It will be under an experimental feature, but I believe it will do what you're looking for when we release it.

doterik commented 8 months ago

@denelon That sounds very promising... Is it possible to download and try the preview? Without compiling, that is... 😁

denelon commented 8 months ago

We're working to get another WinGet 1.8-preview out with the experimental feature available.

Trenly commented 8 months ago

We're working to get another WinGet 1.8-preview out with the experimental feature available.

The experimental feature is now available in the latest pre-release