Patrick Peters
Patrick Peters

Reputation: 9568

How to handle external libraries in source control?

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:

Upvotes: 3

Views: 1111

Answers (3)

Thomas Levesque
Thomas Levesque

Reputation: 292435

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

Upvotes: 0

Darin Dimitrov
Darin Dimitrov

Reputation: 1038820

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

Upvotes: 7

Yves M.
Yves M.

Reputation: 3318

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.

Upvotes: 4

Related Questions