Saturday, November 16, 2013

Bringing back Team Foundation Server Build Folders in 2013!

I've mentioned before my job is pretty cool for a number of reasons but most often it's for the people I get to work with.

A few weeks ago I had the pleasure of being part of a team that was migrating 50+ active projects from Team Foundation Server 2008 as well literally hundreds of build definitions.  Beyond the build definitions they had created a number of custom tasks to extend some of the build capabilities for complex deployment to multiple environments, custom metrics, you name it.

They did it with one TFSBuild.proj file.  Make no mistake.  One. Impressive work Tim Stall.

The challenge of hundreds of build definitions 

I wish I was making that part up, but I'm not. These guys had hundreds of definitions. One may argue that it could have been set up differently, however until you've witnessed the system in action, walked through the complexity, or understood all of the outputs, don't judge. This was the best way.

The company had structured their build definitions by product and then by branch, then branch environment (per branch).   Perhaps this picture will better explain it.

As you can see, it's an ugly mess and just begging for organization.  What's a programmers best organization tool?  Tree views.

Wait, didn't someone make something for this?

Yes!  Inmeta Solutions made a package for Visual Studio 2010 that was pretty awesome but for whatever reason development stopped after 2010 and Microsoft never included it in future versions.  This became troublesome for those of us that loved the tool but also wanted to go beyond VS 2010.  When attempting to go to 2012, we found it to be simply incompatible.  

Why didn't we just use that source code?  

Fellow coding cohort (and coordinator of the new project) Josh Rack had done some research on contributing to the current project but in the end we wanted to extend it out a little differently.  Not because anything was wrong with the Inmeta solution we just wanted to do something different.  That's the fun of open source/community development isn't it?  :)

Josh started off using some of the existing code and trimming back to the necessities.  That's when he contacted me and asked to patch a few bugs and add some features to work more cleanly with Visual Studio 2012/2013 as well as Team Foundation Server 2012/2013.  

Currently the only features that are supported are simply a hierarchical view of the build tree using the '.' as the separator character and you can view the queue, edit the definition, and queue a new build.  We've got a couple items in the queue that we think many users will enjoy (such as the ability to choose the separator character and using that across your entire team).  

At this very moment, I'm waiting for Rack to go ahead and publish the project so you guys can download the latest bits. There are two installers, one for 2012 and the other for 2013. For whatever reason we couldn't get it to play well with 2013 without using the 2013 libraries.  Maybe we'll fix that sometime, until then, enjoy having build folders back!  

You can grab the latest bits and log any issues over at Codeplex.  Let us know what you think!