Battling TFS

As we enter the final weeks before the Alpha release of Warewolf, I find myself doing battle with TFS. At Dev2 we believe in automation for the efficiency gains it can yield. As a result I have found myself in wearing the TFS hat amending build templates to refine and automate our release process.

I thought I had it all figured out quite well, until I had to investigate why our gated check-in process was allowing in poorly referenced project dependencies into our dev branch. An example of a poorly referenced dependency would be where the developer has referenced it directly from his bin\debug causing issues when another developer cleans and builds the solution.

I soon discovered an interesting fact. Microsoft has two build chains, devenv or better known as Visual Studio and MSBuild as used by TFS. As I investigated further, I found that MSBuild had some decency detection issues. This meant that MSBuild, hence our gated check-in process, would build solutions that Visual Studio could not clean and build due to poor referencing.

The end result of this fun fact was to modify our build workflow to clean and build our solutions once in the agent scope. Fortunately for us each developer already has two build agents for their gated check-ins test runs; hence Visual Studio was already installed.

All I needed to do was amend the workflow to build our solutions with devenv. I first set the location of our two solution files. Then clean and build each solution in turn. I check the exit code for each solution’s build step. If they are both zero then I pass things along to MSBuild.

Battling TFS picture

This is just one of the many challenges we have to overcome in our quest to shake up the software development industry with Warewolf.

Travis Frisinger
Senior Developer and Quality Evangelist