如何下载的NuGet包没有nuget.exe或Visual Studio扩展?从nuget.org如何下载、nuget、NuGet、exe

2023-09-02 01:37:59 作者:星辰坠入大海

我如何可以下载的NuGet包?我不具备的NuGet的Visual Studio扩展或命令行程序 nuget.exe 。我怎样才能从网上下载的 .nupack 文件?据我了解我就能从中提取出 .DLL 文件(7-ZIP)为正常使用。

How can I download a Nuget package? I don't have the Nuget Visual Studio extension or the command line program nuget.exe. How can I download the .nupack file from the web? As I understand I will be able to extract the .dll files from it (with 7-zip) to use as normal.

我碰巧有兴趣的包是http://nuget.org/packages/Microsoft.Bcl.Async ,但我想知道如何做到这一点的一般的。

The package I happen to be interested in is http://nuget.org/packages/Microsoft.Bcl.Async , but I would like to know how to do this generally.

在红宝石的世界,这将是很容易 - 在RubyGems的网站上的每个包页面有一个下载链接到一个 .gem 文件,例如。 https://rubygems.org/gems/pony

In the world of Ruby this would be easy - every package page on the RubyGems website has a download link to a .gem file, eg. https://rubygems.org/gems/pony

编辑:以上的NuGet的天定命运的争论在其他地方所属。不要紧,这个问题为什么我避开它。我不是唯一的一个,虽然 https://m.xsw88.com/allimgs/daicuo/20230902/692.png

The argument over Nuget's manifest destiny belongs elsewhere. It doesn't matter to this question why I eschew it. I'm not the only one though https://m.xsw88.com/allimgs/daicuo/20230902/692.png

推荐答案

要么使Nuget.org网站上的帐户,然后登录,浏览到您想要的包并点击下载链接在左侧菜单中。

Either make an account on the Nuget.org website, then log in, browse to the package you want and click on the Download link on the left menu.

或猜测的URL。它们具有以下格式:

Or guess the URL. They have the following format:

https://www.nuget.org/api/v2/package/{packageID}/{packageVersion}

然后,只需解压.nupkg文件并提取您需要的内容。

Then simply unzip the .nupkg file and extract the contents you need.