Monday, January 12, 2009

Team Build and Referenced Assemblies

This session I am going to give some tip how you should reference shared assemblies.

I am currently building an application that uses several things of Enterprise Library and RhinoMocks for unit testing. Now these references have to be made to fixed locations but this can impose problems when building from different machines (think build agents differebt developer machine setups).

What I did was on my build agent I shared the build folder and mapped a networkdrive to it (in my case s:\). then I created a structure like this:
Enltlib\latest\ to which I copied the complete bin directory from entlib. The big advantages is that if you decide to upgrade later you just rename the folder to v4.1 and create a new latest folder where you copy the latest binaries to. Like this everybody will always be referencing the latest binaries without having to redo all their references in their projects

The advantages of this approach is that its completely independent of your machine setup. And if you have to work offline from your TFS once in a while you just make sure you check out the latest version of your BuildStore share the drive on your local machine and map it to the same network drive and your projects will continue to build without having to redirect the references all the time.