"You have an older version of PackageManagement..." Prompts Repeatedly
See original GitHub issueSystem Details
System Details Output
### VSCode version: 1.47.2 17299e413d5590b14ab0340ea477cdd86ff13daf x64
### VSCode extensions:
blackmist.LinkCheckMD@0.3.1
DavidAnson.vscode-markdownlint@0.36.1
docsmsft.docs-article-templates@0.2.9
docsmsft.docs-authoring-pack@0.1.8
docsmsft.docs-images@0.0.9
docsmsft.docs-linting@0.0.5
docsmsft.docs-markdown@0.2.76
docsmsft.docs-metadata@1.0.4
docsmsft.docs-preview@0.3.53
docsmsft.docs-yaml@0.2.5
GitHub.vscode-pull-request-github@0.18.0
ms-vscode.powershell@2020.6.0
msjsdiag.debugger-for-chrome@4.12.9
redhat.vscode-yaml@0.9.1
streetsidesoftware.code-spell-checker@1.9.0
### PSES version: 2.2.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.18362.752
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.752
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
When I open a project, I am prompted with this probably 80% of the time. I’ve run it repeatedly, but it doesn’t seem to make a difference.
If I click “Yes”, this command is run"
PS D:\code\Denholtz\Deployment> powershell.exe -NoLogo -NoProfile -Command 'Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.6 -Scope CurrentUser -AllowClobber'
Expected Behaviour
One prompt makes sense if I’m out of date. But it simply repeats.
Actual Behaviour
Too many prompts.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:88 (8 by maintainers)
Top Results From Across the Web
powershell - VS Code always prompts: "older version of ...
Every time I run it, I get this message: You have an older version of PackageManagement known to cause issues with the PowerShell...
Read more >Solved: 'Answering Yes to “You have an older version of ...
Solved: 'Answering Yes to “You have an older version of PackageManagement known to cause issues with the PowerShell extension.
Read more >Marc D Anderson on Twitter: "Anyone else getting this ...
"You have an older version of PackageManagement known to cause issues with the PowerShell extension. Would you like to update ...
Read more >PowerShellGet - Why won't it update
Fighting with trying to get the latest version of PowerShellGet on my Windows machine because I wanted to prettify my prompt. You will...
Read more >Known Issues with NuGet - Microsoft Learn
This can happen, for example, when you have two versions of Visual Studio installed side-by-side and you then uninstall the older version.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
for anyone else getting this issue, I’ve managed to solve it with this single command - this is somewhat modified version of the solution provided here by @rjmholt :
powershell.exe -NoLogo -NoProfile -Command 'Save-Module PackageManagement -MinimumVersion 1.4.7 -LiteralPath ""C:\Program Files\WindowsPowerShell\Modules\""'
In my case I suspect that the root cause is that my Documents folder is placed on a network folder.
ALRIGHT. Finally found a solution. This packagemanagement issue has been driving me nuts. Seeing it every single time I open VScode, and errors when I need to install a new module or package. There may be an easier way, but here’s how I resolved it since all the suggested install commands would error for me.
MODULE PATHS C:\Program Files (x86)\WindowsPowerShell\Modules C:\Program Files\WindowsPowerShell\Modules C:\Windows\System32\WindowsPowerShell\v1.0\Modules
POWERSHELL GALLERY PATHS https://www.powershellgallery.com/packages/PackageManagement/ https://www.powershellgallery.com/packages/PowerShellGet/
Step 1) Access each Module Path. Step 2) Delete PowerShellGet & PackageManagement
(Note: I make copies of everything before I delete because I’m paranoid, and the copies need to be stored a level above the Modules folder or somewhere else altogether, just not in the Modules folder) Step 3) Access PowerShell Gallery Paths Step 4) Manual Download -> Download the RAW NUPKG file Step 5) Rename extension to ZIP Example: powershellget.2.2.1.nupkg to powershellget.2.2.1.zip Step 6) Unzip Step 7) Copy the unzipped folder to C:\Windows\System32\WindowsPowerShell\v1.0\Modules Step 8) REMOVE the version numbers from both folder names. Leaving only powershellget & packagemanagement Step 9) Open VScode as administrator Step 10) Enjoy never having Vscode complain about packagemanagement & a problem-free module/package installation experience