I know I should be using nuget more but at this point I don’t completely understand the nuances so I still tend to either get source and build the project, then reference the project, or I create my own “dlls” folder and hand copy the dll’s in.
As part of my learning process, I’m trying to understand what is critical and what is not when using nuget. For example, I’ve done install-package restsharp and now when I check into source control, I get files like “packages/RestSharp.103.4/lib/net4/RestSharp.xml”. I’m assuming that nuget will help me with upgrading and such and it needs to have certain meta data type files.
My question is: Should I be ignoring any or all files in the “packages” directory? If so, what and why.
Thanks
There are two workflows for handling this situation. The original workflow was to commit all files (you don’t need to ignore any) in the packages directory so that other developers on your team would have the packages to build the project.
The newer workflow, available since NuGet 1.6, is to enable NuGet’s package restore feature for a solution. This will cause any missing package files to be automatically downloaded when building the project, but now you no longer have to commit large binary files to your version control. As of NuGet 2.0, it is now required to have each developer on your team enable NuGet’s package restore permission inside the Visual Studio options.