Why you should build Open Source projects yourself

The Scenario

On most of my recent projects I've been using a combination of NHibernate, ASP.Net MVC, and Migratordotnet. For testing I've been using MbUnit, Moq, and SQLite.  I'm pretty happy with this suite of tools but one issue I've ran into on when starting my last few projects.

When I need to access a database from my tests, usually in order to verify my mappings, I create a new SQLite database and then run my migrations against the SQLite database. One a new project I'll usually begin using NHibernate's Schema Export tool to create my schema until the databas schema matures enough to deserve a real migration. 

The Problem

Over this weekend I created a new project in just this way and everything was working fine in my unit tests until I changed from using Scheme Export to calling the migrations. Suddenly my tests couldn't find System.Data.SQLite.dll in order to access my test database.  At first I thought it was an issue between running on x86 and x64 as I've had issues with this before but I was able to quickly rule this out because I was getting the errors on both my x86 and my x64 environments.

I'll save the steps I went through but I finally narrowed it down to the fact that the Migratordotnet assemblies that I was using were compiled against an older version of SQLite than I was using. There weren't any breaking changes in the newer version of SQLite that I was using but the changed version was just enough for Migratordotnet to lose it's way in find the location of SQLite.  I solved the issue by rebuidling Migratordotnet to reference the version of SQLite I was using.

The Lesson

I usually just download the latest binary version of any tools I use but I've now  learned how important it is to be able to rebuild your open source applications from source.  It may take a little more work but it can save you hours of frustration.

**As a side note: boy am I glad Migratordotnet wasn't a commercial application.  If it was I'd probably be using something else today.

Sunday, July 19, 2009 10:22 PM

Comments have been closed on this topic.