简体   繁体   中英

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?

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 .

I believe Install-package may act as a wrapper for nuget (basically), but there can be other package providers (and there are), so it can not only call nuget.

C:\> get-packageprovider

Name                     Version
----                     -------
msi                      3.0.0.0
msu                      3.0.0.0
NuGet                    2.8.5.207
PowerShellGet            1.0.0.1
Programs                 3.0.0.0

Choco is just another package provider. you could use it standalone or using the install-package. you can install choco with something like install-packageprovider chocolatey

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM