Customize Team Build 2010 – Part 1: Introduction

by Ewald Hofman 20. April 2010 05:49

In the series the following parts have been published

  1. Part 1: Introduction
  2. Part 2: Add arguments and variables
  3. Part 3: Use more complex arguments
  4. Part 4: Create your own activity
  5. Part 5: Increase AssemblyVersion
  6. Part 6: Use custom type for an argument
  7. Part 7: How is the custom assembly found
  8. Part 8: Send information to the build log
  9. Part 9: Impersonate activities (run under other credentials)
  10. Part 10: Include Version Number in the Build Number
  11. Part 11: Speed up opening my build process template
  12. Part 12: How to debug my custom activities
  13. Part 13: Get control over the Build Output
  14. Part 14: Execute a PowerShell script
  15. Part 15: Fail a build based on the exit code of a console application
  16. Part 16: Specify the relative reference path

Who created a new build definition in TFS 2008 knows that Team Build 2008 heavily relies on MSBuild. The workflow that is executed during the build is defined in a custom scripting language in XML. The language is powerful, but not intuitive. It is hard to understand what is going on exactly, especially for novice users.

In TFS 2010 the build relies on Windows Workflow 4.0. With Workflow you can create a workflow based on activities. The advantages of this approach is that Windows Workflow is very intuitive and it supports parallel execution. Microsoft brings a lot of activities out of the box, but if required you can add your own activities too. This series of blog posts tells you how you can modify the Build Process Template to your own needs. Before starting to build your own customized build process template, it is good to first know how Team Build 2010 works.

Build Controller and Build Agent

When you queue a build in TFS 2008 you choose one of the available Build Agents to execute the build. In TFS 2010 there is a new component introduced, called the Build Controller, to initialize the build. When you queue a build, you choose the Build Controller which starts processing the build. The Build Controller initializes the build and chooses an available Build Agent. The Build Controller persists the workflow and hands it over to the Build Agent, which will continue executing the build and do the heavy lifting. For a deep insight in the overview see Understanding a Team Foundation Build System.

Workflow

Build Process Template

In TFS 2008 the build was executed based on a MSBuild script. This script imports the %ProgramFiles%\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets file. This file contains all the logic to execute the actual build. In the TFSBuild.proj file you override targets and properties to customize the build to your needs. All target files you import (your ‘templates’) in the TFSBuild.proj must exist on the build server. It is not possible in TFS 2008 to store it in Source Control so the build automatically picks up the latest target file. If you have a build farm of multiple build servers, you needed to sync the template target file over all the build servers.

In TFS 2010 you also have a template, which is called the Build Process Template, but it is defined in Windows Workflow. This template is stored in Source Control, so you don’t need to deploy it to every build server anymore. The Build Controller will just use the version that is stored in Source Control.

You configure the build now by choosing a Build Process Template and set the properties that are defined in the template.

TimeTravelling003

In my opinion, Microsoft has made a giant leap to make the build much easier to configure.


 

You can download the full solution at BuildProcess.zip. It will include the sources of every part and will continue to evolve.

Tags:

Team Build | VSTS 2010

Comments

7/21/2010 1:43:39 AM #

pingback

Pingback from tuts9.com

How to write a Team Build Process Template (2010) from scratch? | The Largest Forum Archive

tuts9.com |

10/21/2010 7:32:47 AM #

pingback

Pingback from leonardwoody.com

TFS 2010 Build Process Customization « Leonard S. Woody III – Software Engineer

leonardwoody.com |

11/9/2010 5:32:26 AM #

trackback

Part 14: Execute a PowerShell script

Part 14: Execute a PowerShell script

Ewald Hofman |

11/10/2010 9:14:16 AM #

pingback

Pingback from blogs.like10.com

TechDays 2010 Presentations « Microsoft Team Foundation Server, SharePoint Server, .NET, and SQL Server

blogs.like10.com |

12/2/2010 2:12:24 PM #

pingback

Pingback from blog.toetapz.com

Custom Versioning Strategy on TFS 2010 Using Workflow for Windows Phone 7 Application. | Toetapz's Blog

blog.toetapz.com |

1/20/2011 9:47:15 AM #

pingback

Pingback from danielcolomb.com

Dependency Replication in TFS 2010 « danielcolomb.com

danielcolomb.com |

1/22/2011 11:10:37 AM #

pingback

Pingback from mint.litemedia.se

Create your own custom NUnit build activity for Team Build 2010 «  Mint

mint.litemedia.se |

2/23/2011 8:34:09 AM #

pingback

Pingback from danielcolomb.com

Deploying to Multiple Locations in TFS 2010 « danielcolomb.com

danielcolomb.com |

3/16/2011 8:01:30 AM #

pingback

Pingback from guillaumebrout.fr

TFS2010 – Numéro de build dans les assemblies | Guillaume BROUT

guillaumebrout.fr |

3/20/2011 2:46:45 AM #

trackback

Team Build 2010 Guide

I have been asked a few times about a Team Build 2010 guide. I have taught on writing one and then I

Eran Ruso |

3/25/2011 4:04:10 AM #

pingback

Pingback from learntfs.com

March 25, 2011 – VS/TFS Links and Quick Hits | Learn TFS

learntfs.com |

5/11/2011 12:54:30 AM #

Kenneth E. Spence

Deploying to Multiple Locations in TFS 2010 « danielcolomb.com

Kenneth E. Spence People's Republic of China |

5/28/2011 6:47:37 AM #

pingback

Pingback from joestorey.info

Paramore Return On ‘Transformers’ Soundtrack With New Song, Video » Joe's Blog

joestorey.info |

5/31/2011 8:21:55 AM #

trackback

Ewald’s posts on TFS Build 2010

Ewald Hofman , an ALM MVP, has written a great series of blog posts on Team Build in Team Foundation Server 2010.  The 2010 release introduces Windows Workflow as the overall orchestrator of the build process.  Ewald walks you through quite a few topics related to this and the other new features.  Check it out! Part 1: Introduction Part 2: Add arguments and variables Part 3: Use more complex arguments Part 4: Create your own activity Part 5: Increase AssemblyVersion Part 6: Use custom type for an argument Part 7: How is the custom assembly found Part 8: Send information to the build log Part 9: Impersonate activities (run under other credentials) Part 10: Include Version Number in the Build Number Part 11: Speed up opening my build process template Part 12: How to debug my custom activities Part 13: Get control over the Build Output Part 14: Execute a PowerShell script Part 15: Fail a build based on the exit code of a console application Part 16: Specify the relative reference path Technorati Tags: tfs 2010 , team build , windows workflow

Buck Hodges |

10/1/2011 10:11:47 AM #

pingback

Pingback from andygeldman.com

Custom Build Activities in TFS 2010 « ALM Adventures

andygeldman.com |

10/3/2011 3:29:47 AM #

pingback

Pingback from blog.strobaek.org

Strobaek Blog » HowTo: Team Foundation Server and xUnit

blog.strobaek.org |

10/27/2011 6:18:07 PM #

pingback

Pingback from justaprogrammer.net

Continuous Integration with TFS2010, MSDeploy & VSDBCMD « Just A Programmer

justaprogrammer.net |

11/26/2011 10:31:31 PM #

pingback

Pingback from programmersgoodies.com

How do you set up a TFS build definition with default parameters? - Programmers Goodies

programmersgoodies.com |

7/31/2012 7:20:18 AM #

pingback

Pingback from osnabrugge.wordpress.com

Upgrading your Custom Build Template to TFS 2012 « The Road to ALM

osnabrugge.wordpress.com |

8/2/2012 3:50:38 AM #

pingback

Pingback from codemum.co.uk

Creating custom Workflow activities for TFS Build 2010 | codeMum

codemum.co.uk |

9/26/2012 3:48:02 AM #

pingback

Pingback from dejanvasic.wordpress.com

TFS Build + CI + OctopusDeploy + NuGet + Part 1 | The Place To Be

dejanvasic.wordpress.com |

10/9/2012 3:30:19 AM #

pingback

Pingback from devtfs.wordpress.com

TFS Custom Build Activities and Friends « dev.tfs – A Blog About TFS Development

devtfs.wordpress.com |

10/17/2012 4:24:13 PM #

pingback

Pingback from siteduct.com

Trackback Generator

siteduct.com |

12/8/2012 10:12:50 AM #

trackback

Enhancing the Build in TFS 2012

Enhancing the Build in TFS 2012

Bryan Avery - Blog |

1/10/2013 2:15:37 PM #

trackback

Links to VS/TFS ALM resources

[Wikipedia] Continuous Integration

VS + TFS ALM

MSDN reference page
Glossary
Source

MITHUN SHANBHAG's blog |

2/11/2013 12:36:15 PM #

pingback

Pingback from b4root.wordpress.com

Base Team Build Template « Bryon Root ALM Adventures

b4root.wordpress.com |

2/11/2013 9:07:45 PM #

pingback

Pingback from b4root.wordpress.com

Base Team Build Template V1 « Bryon Root ALM Adventures

b4root.wordpress.com |

3/9/2013 1:28:27 PM #

trackback

shopping stores online

Products less fit for e-commerce include goods that have a low value-to-weight ratio, food that have a smell, taste, or contact component, foodstuffs that need trial fittings—most notably clothing—and yield somewhere colour integrity appears important. Nonetheless, some web sites have had success delivering groceries and clothing sold through the internet is big interest in the U.S.

shopping stores online |

3/25/2013 8:25:36 AM #

pingback

Pingback from b4root.wordpress.com

Resource Links for Build-Deployment-Release | Bryon Root ALM Adventures

b4root.wordpress.com |

4/5/2013 7:57:13 AM #

pingback

Pingback from blog.nwcadence.com

Base Team Build Template V1 - Where Technology Meets Teamwork

blog.nwcadence.com |

4/5/2013 8:13:43 AM #

pingback

Pingback from b4root.wordpress.com

Base Team Build Template V1 | Bryon Root ALM Adventures

b4root.wordpress.com |

4/5/2013 8:16:20 AM #

pingback

Pingback from b4root.wordpress.com

Base Team Build Template V1 | Bryon Root ALM Adventures

b4root.wordpress.com |

5/7/2013 1:46:46 AM #

pingback

Pingback from blog.developpez.com

Blog de Benjamin Devuyst

blog.developpez.com |

6/11/2013 2:09:43 PM #

pingback

Pingback from volatilecoding.com

TFS Build: How To Customize Work Item Association | V O L A T I L E coding

volatilecoding.com |

8/4/2013 10:09:09 PM #

pingback

Pingback from followliker.com

twitter marketing software

followliker.com |

9/17/2013 12:08:09 PM #

pingback

Pingback from phacker.wordpress.com

TFS 2012 Build custom versioning build template | Paul Hacker  .Net, TFS, Etc...

phacker.wordpress.com |

9/30/2013 2:01:07 PM #

pingback

Pingback from gilles.tourreau.fr

[TFS2012] Comment bien gérer l’incrémentation des versions de ses applications de manière automatique avec TFS 2012. –  Blog de Gilles TOURREAU

gilles.tourreau.fr |

11/3/2013 6:24:41 AM #

pingback

Pingback from kentuky.co

New Plans Blog

kentuky.co |

1/13/2014 5:36:24 AM #

pingback

Pingback from queryby.com

How to get path to a `work item` file in a Workspace by C# in a customized activity of TFS 2012 build process template?QueryBy | QueryBy, ejjuit, query, query by, queryby.com, android doubt, ios question, sql query, sqlite query, nodejsquery, dns query, update query, insert query, kony, mobilesecurity, postquery, queryposts.com, sapquery, jquery, mobilequery,gsm query, cdmaquery, phonegap, appcelerator

queryby.com |

1/13/2014 8:07:02 PM #

pingback

Pingback from stackforum.com

How to run another activity in a customized activity of TFS 2012 build process template? | Stackforum.com

stackforum.com |

1/30/2014 1:49:07 AM #

pingback

Pingback from eonlinegratis.com

Automated Architecture Validation | Click & Find Answer !

eonlinegratis.com |

2/4/2014 2:14:59 AM #

pingback

Pingback from 44crosbyrow.com

Ewald Hofman | Customize Team Build 2010 – Part 1: Introduction

44crosbyrow.com |

2/20/2014 10:52:26 PM #

pingback

Pingback from blogtrickszone.com

Become a perfect blogger2500 do-follow blogs List » Become a perfect blogger

blogtrickszone.com |

3/6/2014 9:30:34 PM #

pingback

Pingback from almguide.com

Generating multiple versions of ClickOnce applications with Team Build — ALM Guide - Esteban Garcia

almguide.com |

9/7/2014 10:43:14 PM #

pingback

Pingback from crazeanswers.biz

TFS Build Copy to Versioned Folder - Acorda

crazeanswers.biz |

Comments are closed

Powered by BlogEngine.NET 1.6.1.0
Theme by Mads Kristensen


ClusterMap

Statistics

Statistics created at 09 Sep 2009

121 posts
493 comments
328 raters
1947463 visit (1042 per day)
18 users online

Recent comments

Comment RSS