Tigraine
Daniel Hoelbling talks about .NET

Handling dependencies

October 13th, 2008 . by Daniel Hölbling

After playing around with Log4Net and the Castle MicroKernel, I suddenly discovered that not having those external dependencies under source control makes development quite difficult.

Whenever I update my dependencies, all other people on the team need to adjust theirs to match mine and vice versa. This is a minor annoyance while the team is small, once you grow and have people coming in and out of the team you’ll start to feel real pain!

If sucks even more if you’ve already shipped your application and get called a year later to change something. Trust me, digging up the right version of library X isn’t getting easier over time, and updating the application to a new version may either break the application or cause your customers to update too (both highly undesired!).

So, what’s the right solution to dependencies?
(No it’s not reinventing the wheel over and over again by writing everything by yourself)

Simple: Put the dependencies into a folder called /lib/ and reference them from there, set the “Copy To Output Directory” option to “Copy if newer”.
Then add this folder to your source control and you’re set. Whenever a new guy comes to the team and gets the project from source control, he’s guaranteed to be able to build it without having to run around some random site searching for referenced assemblies.


View Comments to “Handling dependencies”


  1. [...] that all dependencies are also in the svn, so you don’t need to get RhinoMocks or nUnit [...]


  2. [...] use a Sourcecontrol system such as SVN and AnkhSVN to do development. Put all your project files (and external dependencies) under source control and maybe even get a continuous integration server [...]


  3. [...] the project’s page and extract the bin folder to your application folder. I’m a huge fan of having all external assemblies in a lib folder besides the app, so to my delight elmah requires no installation, you just have to drop the 3 files [...]


  4. [...] This little NAnt target is now in charge of copying assemblies I need to my project’s lib directory: [...]

Leave a Reply

Name

Mail (never published)

Website

blog comments powered by Disqus