Preserving Solution Integrity via Integration Builds

There is a problem I've noticed where I work with how the integration build is being done.

The problem is actually caused by how the build script is working.  In terms of building the assemblies that are needed the script collects all the necessary files and uses csc.exe to compile them.  The problem with this method is it bypasses a very important piece of the development puzzle.  That of the Solution and Project files. 

The purpose of the integration build is to make sure that the entire team can continue working.  When you have removed your solution and project files from that process it is inevitable that someone will accidentally check in a bad solution or project.  And when this happens one could argue that your integration build has failed it's purpose.  If someone Gets Latest they can no longer start to immediately work.  Instead they have to spend time resolving the issue.  And half the time the solution may require knowledge from the person who did the check in (and then got called away to a meeting)

With that in mind it's good to look at our options for building and keeping our solution in the mix.  I'm going to use NAnt since it seems to be quite common.

If you are using VS 2002 or 2003 you have a super easy answer.  NAnt has a <solution> task which makes this nice and easy.  Unfortunately at this time VS 2005 support isn't included. 

So now we have two options.  The first I found recently and haven't had a chance to play with is in the NAnt Contrib project and it's called slingshot.  So far the comments I've found on it don't seem to be very kind so I'm not sure if I'll get around to using this since I'm perfectly content with option #2 which is...

Calling msbuild.exe either directly or via the <msbuild> task which is another resident of NAnt Contrib.  I personally am just using the msbuild tag because it's so easy to use. 

So with all that said your Solution file is your friend.. treat it as such and make sure it stays nice and clean.

posted @ Thursday, November 15, 2007 8:47 PM

Print

Comments on this entry:

# re: Preserving Solution Integrity via Integration Builds

Left by Darryl at 11/16/2007 9:17 PM
Gravatar
Hi Shane,

Nice blog! I and spending some time going through MSDN's Workflow Foundation examples and find that they use .NET's "msbuild.exe" command to build their test files. I don't know too much about the suite of tools that comes with .NET, but this command-line utility compiles your code based on settings in the project and solution files. How come I have never heard of this before :-)

Here a link to a description of it:

http://msdn2.microsoft.com/en-us/library/ms164311.aspx

Maybe something like this could be used instead of csc.exe?

# re: Preserving Solution Integrity via Integration Builds

Left by Darryl at 11/16/2007 9:19 PM
Gravatar
Man, you know it sure would have helped if I had read your post all the way through before posting to it. I would have seen that you had already referred to it. Sorry about that :-)

# re: Preserving Solution Integrity via Integration Builds

Left by Shane Courtrille at 11/17/2007 8:22 AM
Gravatar
Heheh no problemo :) MSBuild.exe is nice but as long as it supports everything you need <msbuild> is a little cleaner and easier to use rather then <exec> against msbuild.exe.

# ippszegi

Left by ippszegi at 12/29/2007 10:02 PM
Gravatar
ippszegi
Comments have been closed on this topic.