5

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?
Michael A.
  • 1,071
  • 12
  • 21

2 Answers2

4

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.

ferventcoder
  • 11,952
  • 3
  • 57
  • 90
  • 1
    Awesome answer. Exactly I was searching for! Thank you! – Michael A. Jun 17 '17 at 17:05
  • But one more question: so nuget.exe and choco utilities relay upon different sources, not listed in PackageManager? – Michael A. Jun 17 '17 at 17:06
  • No idea if those sources are listed in PackageManager - I know the prototype Chocolatey provider didn't have this functionality (choco.exe does). With ChocolateyGet, you manage default sources with choco.exe (`choco source -?`). I can't speak for NuGet but I'd assume the provider would use same source that nuget.exe does when not explicitly specified. – ferventcoder Jun 17 '17 at 17:14
1

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

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • Thank you. Main focal point of the question: what the difference between them. – Michael A. Jun 15 '17 at 20:01
  • well, those are different things (to some extent). nuget\choco\etc are package management providers. there's no real difference between them (in the sense of what they try to achieve, they just do it slightly differently). I'm not sure what do you expect to hear as an answer. its pretty clear there's no real difference between them. its like asking whats the difference between a kia and toyota. no difference. they get you from point a to point b. – 4c74356b41 Jun 15 '17 at 20:16
  • I am sure there is. Otherwise people wouldn't say "nuget for dependencies, choco for apps installation". And who will invent something new if old already solves same problems? – Michael A. Jun 15 '17 at 21:36
  • oh lol, yeah. https://xkcd.com/927/ I'm not saying they are exactly the same, but they are mostly the same. – 4c74356b41 Jun 15 '17 at 21:38
  • Will be interesting for you: https://stackoverflow.com/questions/24662550/difference-between-chocolatey-and-nuget – Michael A. Jun 15 '17 at 21:40
  • @4c74356b41 There is quite a difference in functionality, so maybe it's more like comparing a Kia Optima to a Tesla Model S. They both are package managers, but Chocolatey does a lot more than just get the files. Chocolatey uses the NuGet framework for just one aspect of what it does. – ferventcoder Jun 16 '17 at 16:19