如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?

时间:2023-01-19 20:53:54

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.

如何下载NuGet包?我没有NuGet Visual Studio扩展名或者命令行程序nuget.exe。如何从web下载.nupack文件?据我所知,我将能够从它(带7-zip)中提取.dll文件以正常使用。

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.

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

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

在Ruby的世界里,这很简单——RubyGems网站上的每个包页都有一个到.gem文件的下载链接,例如:https://rubygems.org/gems/pony


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.

关于NuGet的“天命”的争论属于其他领域。我为什么要回避这个问题并不重要。我不是唯一的。

6 个解决方案

#1


62  

Although building the URL or using tools is still possible, it is not needed anymore.

尽管构建URL或使用工具仍然是可能的,但是不再需要它了。

https://www.nuget.org/ currently has a direct download link that is available even if you don't have an account on the site.

https://www.nuget.org/目前有一个直接的下载链接,即使你在网站上没有账号也可以使用。

(at the bottom of the right column).

(在右列的底部)。


Example of EntityFramework's detail page: https://www.nuget.org/packages/EntityFramework/: (Updated after comment of RenniePet.)

EntityFramework的详细页面示例:https://www.nuget.org/packages/EntityFramework/:(在RenniePet的评论之后更新)

如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?

#2


210  

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.

要么在Nuget.org网站上注册一个账号,然后登录,浏览到你想要的软件包,点击左边菜单上的下载链接。


Or guess the URL. They have the following format:

或者猜测URL。它们的格式如下:

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

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

然后简单地解压缩.nupkg文件并提取您需要的内容。

#3


34  

Based on Xavier's answer, I wrote a Google chrome extension NuTake to add links to the Nuget.org package pages.

基于Xavier的回答,我编写了一个谷歌chrome扩展NuTake来添加到Nuget.org包页面的链接。

#4


11  

To obtain the current stable version of the NuGet package use:

获取当前使用NuGet包的稳定版本:

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

#5


7  

I haven't tried it yet, but it looks like NuGet Package Explorer should be able to do it:

我还没有尝试过,但是看起来NuGet Package Explorer应该可以做到:

https://github.com/NuGetPackageExplorer/NuGetPackageExplorer

https://github.com/NuGetPackageExplorer/NuGetPackageExplorer

如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?

(or like Colonel Panic says, 7-zip should probably do it)

(或者就像恐慌上校说的那样,7-zip也许可以这么做)

#6


5  

  1. Go to http://www.nuget.org
  2. 去http://www.nuget.org
  3. Search for desired package. For example: Microsoft.Owin.Host.SystemWeb
  4. 寻找理想的方案。例如:Microsoft.Owin.Host.SystemWeb
  5. Download the package by clicking the Download link on the left.
  6. 点击左边的下载链接下载这个包。
  7. Do step 3 for the dependencies which are not already installed. 如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?
  8. 对尚未安装的依赖项执行步骤3。
  9. Store all downloaded packages in a custom folder. The default is c:\Package source.
  10. 将所有下载的包存储在自定义文件夹中。默认是c:\包源代码。
  11. Open Nuget Package Manager in Visual Studio and make sure you have an "Available package source" that points to the specified address in step 5; If not, simply add one by providing a custom name and address. Click OK. 如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展? 如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?
  12. 在Visual Studio中打开Nuget包管理器,并确保您有一个指向步骤5中指定地址的“可用包源”;如果没有,只需通过提供自定义名称和地址添加一个。单击OK。
  13. At this point you should be able to install the package exactly the same way you would install an online package through the interface. You probably won't be able to install the package using NuGet console.
  14. 此时,您应该能够以完全相同的方式通过接口安装在线包。您可能无法使用NuGet控制台安装包。

#1


62  

Although building the URL or using tools is still possible, it is not needed anymore.

尽管构建URL或使用工具仍然是可能的,但是不再需要它了。

https://www.nuget.org/ currently has a direct download link that is available even if you don't have an account on the site.

https://www.nuget.org/目前有一个直接的下载链接,即使你在网站上没有账号也可以使用。

(at the bottom of the right column).

(在右列的底部)。


Example of EntityFramework's detail page: https://www.nuget.org/packages/EntityFramework/: (Updated after comment of RenniePet.)

EntityFramework的详细页面示例:https://www.nuget.org/packages/EntityFramework/:(在RenniePet的评论之后更新)

如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?

#2


210  

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.

要么在Nuget.org网站上注册一个账号,然后登录,浏览到你想要的软件包,点击左边菜单上的下载链接。


Or guess the URL. They have the following format:

或者猜测URL。它们的格式如下:

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

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

然后简单地解压缩.nupkg文件并提取您需要的内容。

#3


34  

Based on Xavier's answer, I wrote a Google chrome extension NuTake to add links to the Nuget.org package pages.

基于Xavier的回答,我编写了一个谷歌chrome扩展NuTake来添加到Nuget.org包页面的链接。

#4


11  

To obtain the current stable version of the NuGet package use:

获取当前使用NuGet包的稳定版本:

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

#5


7  

I haven't tried it yet, but it looks like NuGet Package Explorer should be able to do it:

我还没有尝试过,但是看起来NuGet Package Explorer应该可以做到:

https://github.com/NuGetPackageExplorer/NuGetPackageExplorer

https://github.com/NuGetPackageExplorer/NuGetPackageExplorer

如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?

(or like Colonel Panic says, 7-zip should probably do it)

(或者就像恐慌上校说的那样,7-zip也许可以这么做)

#6


5  

  1. Go to http://www.nuget.org
  2. 去http://www.nuget.org
  3. Search for desired package. For example: Microsoft.Owin.Host.SystemWeb
  4. 寻找理想的方案。例如:Microsoft.Owin.Host.SystemWeb
  5. Download the package by clicking the Download link on the left.
  6. 点击左边的下载链接下载这个包。
  7. Do step 3 for the dependencies which are not already installed. 如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?
  8. 对尚未安装的依赖项执行步骤3。
  9. Store all downloaded packages in a custom folder. The default is c:\Package source.
  10. 将所有下载的包存储在自定义文件夹中。默认是c:\包源代码。
  11. Open Nuget Package Manager in Visual Studio and make sure you have an "Available package source" that points to the specified address in step 5; If not, simply add one by providing a custom name and address. Click OK. 如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展? 如何下载一个没有Nuget的Nuget包。exe还是Visual Studio扩展?
  12. 在Visual Studio中打开Nuget包管理器,并确保您有一个指向步骤5中指定地址的“可用包源”;如果没有,只需通过提供自定义名称和地址添加一个。单击OK。
  13. At this point you should be able to install the package exactly the same way you would install an online package through the interface. You probably won't be able to install the package using NuGet console.
  14. 此时,您应该能够以完全相同的方式通过接口安装在线包。您可能无法使用NuGet控制台安装包。