microsoft / microsoft/winget-cli
Unable to install PowerShell Preview 7.4 with PowerShell 7.3 installed.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
When attempting to install PowerShell Preview 7.4 side-by-side with PowerShell 7.3 using winget, the installation is blocked with the message "Found an existing package already installed."
It appears that winget is identifying the installed version of PowerShell 7.3 as PowerShell Preview 7.4.
Steps to reproduce
- Search for available packages
winget search "Microsoft.PowerShell - Attempt to install PowerShell Preview
winget install --source 'winget' --interactive --id 'Microsoft.PowerShell.Preview''
Expected behavior
winget should successfully install PowerShell Preview 7.4 side-by-side with PowerShell 7.3.
Actual behavior
winget is unable to differentiate between the two versions of PowerShell and is therefore preventing the installation of the Microsoft.PowerShell.Preview package.
winget listing installed versions of PowerShell.
- Notice how it identifies PowerShell 7.3 as both "Microsoft.PowerShell" and "Microsoft.PowerShell.Preview".
> winget list --id "Microsoft.PowerShell"
Name Id Version Source
-----------------------------------------------------------
PowerShell 7.3.1.0-x64 Microsoft.PowerShell 7.3.1.0 winget
> winget list --id "Microsoft.PowerShell.Preview"
Name Id Version Available Source
------------------------------------------------------------------------------
PowerShell 7.3.1.0-x64 Microsoft.PowerShell.Preview < 7.4.1.0 7.4.1.0 winget
winget search results and installation error message.
- I included two different attempts at installing, as they have slightly different error messages.
> winget search "Microsoft.PowerShell"
Name Id Version Source
-------------------------------------------------------
PowerShell Microsoft.PowerShell 7.3.1.0 winget
PowerShell Microsoft.PowerShell.Preview 7.4.1.0 winget
> winget install --scope 'machine' --architecture 'X64' --source 'winget' --interactive --exact --id 'Microsoft.PowerShell.Preview'
Found an existing package already installed. Trying to upgrade the installed package...
No applicable upgrade found.
> winget install --source 'winget' --interactive --id 'Microsoft.PowerShell.Preview'
Found an existing package already installed. Trying to upgrade the installed package...
A newer version was found, but the install technology is different from the current version installed. Please uninstall the package and install the newer version.
Environment
Windows Package Manager (Preview) v1.5.101-preview
Windows: Windows.Desktop v10.0.22621.1105
Package: Microsoft.DesktopAppInstaller v1.20.101.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the winget list, winget search, and winget install commands from the issue on the stated Windows Package Manager version. Trace how the CLI identifies Microsoft.PowerShell and Microsoft.PowerShell.Preview when both versions are installed. Done means the preview package installs side-by-side without being treated as the stable package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100