R – MSBuild vs. NAnt for a mixed 2005 and 2003 codebase

build-automationbuild-processmsbuildnant

We are currently maintaining a huge code base with hundreds of *.proj and perhaps 50 solutions with interconnected dependencies.

All of our code base is either .net or legacy C++.

Are current build process is a nested command line script that does automated source control pulling and then builds each solution in turn by calling devenv.exe.

I would like to take advantage of some of the better build and deployment tools and I think I have settled between either NAnt or MSBuild.

Here is the rub :

About half of the code base is being built under visual studio 2003. The other half is 2005. It is not politically feasible to migrate it forward to the current IDE at this time as it will require re-testing and introduce risk.

My question is – Has anyone successfully use MSBuild to build legacy 2003 solutions? Can I easily create customs tasks that call our legacy solutions by invoking devenv.exe?

Or should I only be considering NAnt at this time?

Best Answer

I think a hybrid approach might be best here as well. Just use your MSBuild scripts for the VS2005 projects, and build NAnt scripts for the older VS2003 projects. If you need a build script to manage both, use NAnt to control the process, along with the NAnt MSBuild task.

The downside here is that you will have to maintain some knowledge of two build systems, but my bet is that you'd be migrating to MSBuild over the long-term anyway.