tags:

views:

54

answers:

3

How do you handle external libraries in .NET projects (C#) ?

Possible scenario's could be:

  1. Put the external library in source control
  2. Put the external library on a file server and create a copy-script and add this script to source control

I would recommend to put external libs on a file server, create a copy-local script and map it to a substitute drive (R drive for example) and reference each lib with its name and versionnr; for example R:\MyLib\V1.0.0.0\mylib.dll or R:\YourLib\V1.3.2.1\yourlib.dll. The copy-local script copies the 2 files from a shared file server to R:

+3  A: 

Assuming the assemblies are not from the .NET Framework I would go for the first solution. With this solution you can have everything in one place and the versions do stick with a specific revision of your application.

Having everything on a server adds to many external dependencies to you project. Everyone in the team must have access to the place where you store the files. What happens if you work from home without access to the server etc.

Yves M.
Well.. getting access at home to a TFS instance should be a problem then also...
Patrick Peters
Well... it should be possible to work offline in the TFS... http://stackoverflow.com/questions/313653/work-offline-in-team-foundation-server
Yves M.
when working offline you already have the binaries locally in your own workspace copied, so that shouldn't be a problem then
Patrick Peters
+6  A: 

Put the external library in a local lib folder to your project. This way each project is self-contained.

Darin Dimitrov
+1 for self-containment. If a new developer joins your project, get-latestversion + build should work immediately
StephaneT
A: 

I usually put the libraries in a lib folder inside the solution folder. If those libraries are open-source, I also use the svn:externals feature to keep them up to date

Thomas Levesque