Where to store external DLL files?

anon picture anon · Nov 25, 2010 · Viewed 33.3k times · Source

In my project I'm using some third-party libraries. I include them using the references folder in Visual Studio.

But where should I save the DLL files? They are referenced from a path in the file system, but it would be nice if I can include it into the project. But how?

Answer

Aliostad picture Aliostad · Nov 25, 2010

This is what I do:

  • Create a lib folder at the solution level
  • Download and copy all my third-party DLL files into there
  • Reference from the lib folder
  • Put all those DLL files in the source control. I am using Subversion, and I add them manually but this is one-off.

You can also add a solution folder and add them there.


UPDATE 2012-12-19

The answer above was when NuGet was in infancy. FWIW, my approach where we have NuGet items:

  1. Do as above for plain DLL file dependencies (where they don't have a NuGet pkg)
  2. Enable "Package Restore" for the solution
  3. Change packages.config file if needed to lock down the version to a particular package
  4. Do not store the package themselves in the version control system (set ignore for Git, Mercurial, etc.)

I actually use NuGet for managing even internal dependencies and have a private feed.