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
[Won't update]: Microsoft.PowerShell #150353
Comments
are you...trying to update PowerShell while running the powershell version that is supposed to be removed & updated? |
Probably due to #127283 (comment) |
I tried this from other shells also. Again, same behaviour in CMD or windows powershell as in ms PowerShell. Even if this is the cause, I would expect that winget, as an independent tool,would still be able to consistently recognise the versions, but that the update installer would then fail (kind of like if you try to delete a file that is already open). In this case, winget doesn't seem to even understand that the system has an old version even though it has just there is a newer version available. |
Wow. Just skimming through the linked issue that also links to another issue and so on, it seems that, essentially, winget gets confused between all the different packages named "powershell"... Who could have possibly predicted problems with naming different packages with the same name...🤦 |
Yes - with a diversity of installer types and CPU architectures, some software packages have a handful of installers. Add language localization, and some of Mozilla's manifests have more than 100 installers listed. The package manager logic downloads the repo's contents inside an MSIX, and compares this to the Registry, returning matching results. Not just on name, but many manifests also utilize Sometimes, a dupicate registry entry can cause issues. Could you run |
Here is the output: PS C:\> winget list powershell
Name Id Version Available Source
------------------------------------------------------------------------------
PowerShell 7.4.1.0-x64 Microsoft.PowerShell 7.4.1.0 7.4.2.0 winget
Windows Terminal Microsoft.WindowsTerminal 1.19.10821.0 winget |
The input from @R-Adriangot got me thinking a little, so I tried checking the PSVersion Table from cmd prompt. c:\>PowerShell $PSVersionTable
Name Value
---- -----
PSVersion 5.1.22621.2506
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.2506
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1 So perhaps the "system" (i.e. Windows and winget combined) somehow only sees the Windows powershell and not Microsoft PowerShell. Of course I could update PowerShell by just downloading the relevant MSI installer... but this is a problem with winget (or perhaps Windws) that maybe should be fixed |
Hmm: c:\>winget uninstall Microsoft.PowerShell
No installed package found matching input criteria. |
This is beyond my current knowledge of the system. I do not currently know what state the Registry could be in, which would give the outputs pasted in this Issue. |
Well, looks like Windows took care of this itself somehow while I wasn't looking. Thanks for th help anyway @stephengillie ! |
Please confirm these before moving forward
Category of the issue
No applicable update found.
Brief description of your issue
winget update
shows that Microsoft.PowerShell is behind (7.4.1.0) the latest release (7.4.2.0)winget update Microsoft.PowerShell
thinks there is not newer release.THe PowerShell repo does show the newer release: https://github.com/PowerShell/PowerShell/releases/tag/v7.4.2
Steps to reproduce
Actual behavior
PowerShell is not updated
Expected behavior
PowerShell is updated
Environment
Screenshots and Logs
The text was updated successfully, but these errors were encountered: