Search code examples
windowspowershellnugetchocolatey

What is the difference betwee "nuget install" , "Install-Package" and "choco install"?


And more specific questions. Do I understand right that:

  1. "nuget install" installs always to the directory you run it from?
  2. "choco install" installs to special choco's directory and than runs the scripts to spread it in the system?
  3. "nuget install" is just a wrapper for the Install-Package?

Solution

  • NuGet is a packaging framework that provides packaging for NuGet, PowerShell Modules (PowerShell Gallery), and Chocolatey.

    PackageManagement (aka OneGet) is a Package Manager Manager (yes, really) that implements Install-Package to work with package managers (called providers) like NuGet, PowerShell Get, and Chocolatey.

    • NuGet (the tool, not the framework) is used for development purposes and typically packages software libraries (dlls).
    • Chocolatey is for Software Deployment and Management and typically packages software, tools, and applications.
    • Install-Package is an interface to either of those (and more) through providers.

    NOTE: If you want to interface with Chocolatey in PackageManagement (through Install-Package), use ChocolateyGet for now and wait until the official provider Chocolatey is available. The current is a prototype. If you want more details, please see https://github.com/chocolatey/chocolatey-oneget/issues/5#issuecomment-275404099.