Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download old version of package with NuGet

Tags:

nuget

Is there a way to download a previous version of a package with NuGet, not the latest one?

like image 588
ryudice Avatar asked Apr 11 '11 23:04

ryudice


People also ask

How do I change NuGet package version?

Right-click the Packages folder in the project, and select Update. This will update the NuGet package to the latest version. You can double-click the Add packages and choose the specific version.


2 Answers

Bring up the Package Manager Console in Visual Studio - it's in Tools / NuGet Package Manager / Package Manager Console. Then run the Install-Package command:

Install-Package Common.Logging -Version 1.2.0 

See the command reference for details.

Edit: In order to list versions of a package you can use the Get-Package command with the remote argument and a filter:

Get-Package -ListAvailable -Filter Common.Logging -AllVersions 

By pressing tab after the version option in the Install-Package command, you get a list of the latest available versions.

like image 113
PHeiberg Avatar answered Oct 09 '22 01:10

PHeiberg


Browse to its page in the package index, eg. http://www.nuget.org/packages/Newtonsoft.Json/4.0.5

Then follow the install instructions given:

Install-Package Newtonsoft.Json -Version 4.0.5 

Alternatively to download the .nupkg file, follow the 'Download' link eg. https://www.nuget.org/api/v2/package/Newtonsoft.Json/4.0.5

Obsolete: install my Chrome extension Nutake which inserts a download link.

like image 42
Colonel Panic Avatar answered Oct 09 '22 03:10

Colonel Panic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!