SubSonic and Automation with MSBuild

June 10th, 2007

SubSonic is a very useful project that you can use to generate a data access layer by reading your database schema. The command-line utility called SubCommander can generate the code in C# or VB.NET. The command-line tool can also generate scripts for the database to help you with versioning.

These commands can take a few parameters which may be different from project to project. To make it easy to keep track of multiple projects you can use MSBuild to automate the SubSonic tasks. I have prepared a sample project and video to walk through how it works. And if you are new to MSBuild, you can read 7 Steps to MSBuild to get a jump start.

2 Responses to “SubSonic and Automation with MSBuild”

  1. R Sturim Says:

    Nice work! Thanks for the contribution!

  2. Brennan’s Blog » Blog Archive » Reasons to Blog and Tips to do it Well Says:

    [...] wanted to automate the code generation with MSBuild. I had done this before and documented it with a blog entry, sample project and video. (Flash version) Since I had created this sample project a few months [...]