In my previous post I mentioned that we're moving towards a more fine grained structure for our repositories. This direction has had a quite interesting effects on our build scripts...

We don't use build scripts any more

Yes you read that correctly. Since we now have much less moving pieces in our repositories the complexity of our build has decrease to the point that we don't see any value in running scripts to perform our build. Actually that isn't entirely true since we use Visual Studio to do our builds and that's technically a build script.

So let me rephrase: We don't use a separate scripting language apart from msbuild (csprojs + sln's) to build our source code. This means that we build locally using Visual Studio (or msbuild on the commandline) and on the build server (TeamCity) we use the Visual Studio solution build runner. This means that we can skip the dreaded readme.txt that tells you all the steps you need to do before you can fire up Visual Studio and get some coding done.

But MsBuild sucks?

Yes it surely sucks, being a recovering NAnt user I can sincerely tell you that all that xml is bad for your eyes. We moved from NAnt to psake and that was a great relief to manage our very complex build at that time without paying the xml-tax. But now it seems we've come full circle, yes we need to drop back to hacking xml straight into the csprojs now and then but we see that as healthy friction that tells us that we need to simplify in order to keep our goal that a "release build in visual studio should create production ready binaries". Yes we're not there yet hence the "release build" part. We needed to make this trade off since we still do ilmerge which can be quite time consuming so we decided to only do it for release builds. Again this friction is good since that is pushing us to find ways to avoid ilmerging  dependencies since that tends to come back to haunt you in the end.  If we need more advanced things like package restore using ripple and automatic versioning using GitFlowVersion we've created our own msbuild tasks to avoid to much xml editing.

Final words

I'm not saying that you should avoid build scripts but our journey towards small repos has allowed us to get away with just the .sln's and .csprojs's to handle out build and it has worked out very nicely for us.