Install-Package & NuGet Package install location - where installed to? Install-Package & NuGet Package install location - where installed to? powershell powershell

Install-Package & NuGet Package install location - where installed to?


If it is installed, where is it installed?

Assuming you are on a Windows machine, PowerShell packages are usually installed in C:\Program Files\WindowsPowerShell\Modules (global) or C:\Users\%USERNAME%\Documents\WindowsPowerShell\Modules (CurrentUser).

nuget.exe specifically is installed - yeah, just where you install it; quoting from NuGet CLI Reference (MSDocs):

Installing nuget.exe

  1. On Mac and Linux, install Mono 4.4.2 or later.
  2. Visit nuget.org/downloads and select the version of NuGet you want.
  3. Each download is the nuget.exe file directly. Instruct your browser to save the file to a folder of your choice. The file is not an installer; running it from the browser won't show anything.
  4. Add the folder where you placed nuget.exe to your PATH environment variable to use the CLI tool from anywhere.

This seems somewhat confusing, doesn't it? Keep in mind that there are 3 different packages/applications:

  1. NuGet CLI (like referenced)
  2. NuGet PowerShell Package / Package Manager Console (What you are searching for I think) exports own Install-Package
  3. PowerShell's PackageManagement Package (Which also an Install-Package cmdlet)


Re-reading my updated question, I don't think it is an issue to install nuget.exe on the build servers. Or use docker eg. https://blog.alexellis.io/3-steps-to-msbuild-with-docker/.

As @Clijsters rightly pointed out, there are instructions on downloading nuget. And this would be the most sensible thing to do. I was just a bit confused with the ability for power shell to install it. But that is not nuget.exe.

The environment I'm working in likely doesn't support Docker so I won't pursue that at this time.