Archive for the ‘C#’ Category

Recently, I have been working with Database Projects within Visual Studio 2005 (yes, I’m set in my ways — I haven’t got around to VS2008 yet!!). I like the ability to source control my creation scripts and stored procedures and I’m happy to use the VS IDE to write my SQL code and running individual scripts against multiple development Database References is a breeze.

However, deploying the finished scripts to a production database is a bit of a nightmare. Essentially, if each script file represents a single database object, you have to ensure that you run them all in the correct order — especially if you have foreign key constraints (you do have foreign key constraints, don’t you?!). Ordering all these scripts manually is a royal pain.

After the second or third time of being stuck in this situation, I decided enough is enough and set about writing a small app to do the job for me. The results of this formed the mighty DependencyList.