安装NuGet

转载于 http://docs.nuget.org/docs/start-here/installing-nuget

NuGet can be installed and updated using the Visual Studio Extension Manager. To check if your copy of Visual Studio already has the NuGet extension, look for Library Package Manager in the Tools menu of your copy of Visual Studio.

Menu

If your copy of Visual Studio does not already have the Library Package Manager (NuGet) extension, you can install it using the Extension Manager.

Using the Extension Manager

In Visual Studio, click Tools and then Extension Manager.

In the Extension Manager dialog box, select the Online Gallery tab, and enter "nuget" in the search box to find the NuGet Package Manager extension.

Select NuGet Package Manager and then click Download.

Extension Manager showing NuGet

In the Installer dialog box, click Install.

Visual Studio Extension Installer

When installation is complete, close and re-open Visual Studio.

Visual Studio Extension Installer Complete

NuGet is now ready to use.

You can also install NuGet from the Visual Studio Gallery by downloading and executing the extension installer.

Screen shot of NuGet on the Visual Studio Gallery on MSDN

Download and run the VSIX file. You'll need to agree to the terms, wait for the install to complete and then exit. Close all open instances of Visual Studio and restart.

NuGet is now ready to use.

Updating NuGet

You can update NuGet using the Visual Studio Extension Manager. Navigate to the Extension Manager and click on the Updates tab to check for updates.

If there is a new version of NuGet you will see it in the list of available updates.

Extension Manager showing a new version of NuGet available

Select NuGet in the list and click Update. When the update is complete, close and re-open all open instances of Visual Studio.

Installing a CI build

If you want to run the very latest unreleased build of NuGet, you can install it from the Build Server.

Important note: the official NuGet build is signed, while the one from the Build Server is not. For that reason, Visual Studio will not let you install a CI build if you already have an official build installed. If you do, you'll get an error that looks like:

The installed version of 'NuGet Package Manager' is signed, but the update version is not signed. Therefore, Extension Manager cannot install the update.

To avoid this issue, you need to uninstall the official build (from the VS extension manager) before installing the unsigned build. Likewise, please uninstall the unsigned build before going back to an official build. However, you don't need to do this from going to a unsigned build to a newer unsigned build. If Visual Studio won't allow you to uninstall the extension (the Uninstall button is disabled), then you likely need to restart Visual Studio using "Run as Administrator."

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值