Reputation: 608
I would like to check my full solution into a source control repository (GIT). I am well aware of the discussion pertaining to whether or not to check in Nuget packages into source control. For various reasons I have decided I would like to put my Nuget packages in source control.
My question is: What files at minimum should be checked into the repository? There are various files which are obviously part of the build and some which are part of the Nuget setup. Is there some easy way of obtaining only the core (build related) files? I was hoping to do a simple "make clean" and check everything in, however it appears that after doing this, there are still .dll and .pdb files within the Nuget 'packages' directory.
Any guidance on this topic is much appreciated!
Upvotes: 2
Views: 1687
Reputation: 100581
If you do decide to add the packages directory, it is best to check in everything in that directory. Especially the dll files are needed, since they are the built products that are shipped via NuGet, but you can't really tell which files are needed since any NuGet package could contain build logic that can do anything (e.g. use any file included in the package).
It is probably best to use the .gitignore
file from GitHub's "VisualStudio" gitignore file and remove the lines concerning the **/packages
directory in the section of the file dealing with NuGet packages.
Upvotes: 2