A while back I posted a post about a concept I call the Independent trunk. The core concept is that everything required to build a distributable version of a software product is checked in under one branch in the source-control system. A build system should get everything it requires to build the system from the branch and shouldn’t need any more sources.

Ideally I would thus like to have custom buildtasks checked in under the branch so that the custom build processes for the product follow the evolution and version history of the product.

Now buildtasks for MSBuild doesn’t change very often, so we had a theory that we could have a compiled version of the checked in as a reference for the build system. Having the buildtask set up to be checked out and checked in as its recompiled.

Anyway we looked into this, this week. It turn out that such a setup is not valid for MSBuild. The reason is due to the order in which MSBuild does things.

See first MSBuild compiles and checks the project files and their structures. Then it goes to fetch the sources needed for the build.

This means that in order to have custom buildtasks they have to be avaliable from the same location that the TFSProj file is located or be avaliable before the sources are fetched from the server.

All in all, we cannot have the buildtargets checked in with the product under source-control.

If anyone have an idea on how to get around this constraint I’m all ears.