Nuget.exe 在哪?

我正在使用 VisualStudo2015,并且我有一个包管理器控制台,在那里我可以像这样运行

PM> Install-Package Newtonsoft.Json

Visual Studio 似乎带有 nuget,但是 nuget.exe 的位置在哪里呢?

或者 Package Manager Console 不使用 nuget.exe?

103890 次浏览

Visual Studio 2015 uses various NuGet assemblies but it does not itself include NuGet.exe.

NuGet.exe can be downloaded from the NuGet web site:

https://www.nuget.org/downloads

Another great option nowadays is to use winget (if you have Windows 10 v1709 or greater). In the Command Prompt, enter:

winget install Microsoft.NuGet

(below follows some extra information for the curious mind) This will:

  1. Install the official nuget.exe in your PC.
  2. Create a Symbolic Link here: %localappdata%\microsoft\winget\links
  3. Make the nuget.exe globally available for your user to call it from anywhere, since the aforementioned directory should be present in your user's PATH variable.