OneGet / oneget

PackageManagement (aka OneGet) is a package manager for Windows
MIT License
2.38k stars 189 forks source link

Attempt to upgrade nuget provider downgrades it #507

Open JVimes opened 2 years ago

JVimes commented 2 years ago

I followed these instructions, which said:

Before updating PowerShellGet, you should always install the latest NuGet provider. From an elevated PowerShell session, run the following command.

Install-PackageProvider -Name NuGet -Force

But that command appears to downgrade my NuGet provider from 3.0.0.1 to 2.8.5.208:

PS> Write-Host Before: (Get-PackageProvider NuGet).Version
>> Install-PackageProvider NuGet -Force | Out-Null
>> Write-Host After: (Get-PackageProvider NuGet).Version
Before: 3.0.0.1
After: 2.8.5.208

Am I doing something wrong?

My shell info
PSVersion                      5.1.19041.1023
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1023
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
alerickson commented 2 years ago

No, not at all, those instructions are a bit outdated and there are some issues with using 3.0.0.1, so I would highly suggest staying with 2.8.5.x. I'll update the instructions to reflect this.

JVimes commented 2 years ago

Thank you, @alerickson! Any idea how I ended up with 3.0.0.1? It might be nice if it were out of circulation until fixed. The issue I ran into took a day for me to figure out ("Unable to resolve package source" for password protected PS repo).