Download old version of package with nuget

有没有办法用nuget下载以前版本的软件包,而不是最新版本?


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.


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.


Another option is to change the version number in the packages.config file. This will cause NuGet to download the dlls for that version the next time you build.

链接地址: http://www.djcxy.com/p/62270.html

上一篇: 包装在发布模式下编译的NuGet项目?

下一篇: 使用nuget下载旧版本的软件包