I’ve been hearing and reading about NuGet on various podcasts and blogs, so I decided to give it a test drive today. First impression – super simple to use, and pretty powerful.
NuGet is a Package Management system for Visual Studio .NET. It plugs in as a VS extension, and then from there, you have a (PowerShell based) command-line right there as a VS tabbed window, or a UI-based dialog interface.
Within 3 minutes, I installed NuGet from here, restarted VS, listed a TON of packages, and then installed MvvmLight into my simple WPF application. From there, I’m off and running as if I had done all that manually.
I really like that it not only downloads and “installs” the package, it adds any necessary assemblies to your project references, and can even update your web.config or app.config file. SWEET. It looks like the downloaded assemblies go into a “packages” directory and they are referenced in the project from there (i.e. local references, not via the GAC).
To figure out:
- Is the “packages” directory configurable? We usually call ours “Referenced Assemblies” (done. see below)
- Can the “packages” be put under source control in the project?
I’m going to go learn about Caliburn next — I wish it had a NuGet package (they’re apparently working on it)…
Update: Found out how to change the directory where the packages get installed. Issue #215 talks about it. Create a file named nuget.config at the same directory level as your solution. The contents of the file should be the following:
<settings> <repositoryPath>Referenced Assemblies</repositoryPath> </settings>