How to create a new project for the TFS Build Extensions

If you’ve been working with TFS 2010 build workflows you might have come across a community-developed set of custom activities on Codeplex called the Community TFS Build Extensions. This is a great add-on to the built-in activities but the documentation is still under development so starting to work with the activities can be a bit more work that necessary.

The steps below should help you get create a new .NET project for developing custom build templates with the TFSBE activities:

  1. Download and extract the latest Community TFS Build Extensions release.
  2. Create a new Workflow Activity Library.
    clip_image001
  3. Make sure target framwork is set to .NET Framework 4
    clip_image002
  4. Add a reference to System.Drawing
  5. Add references to Microsoft Team Foundation Server assemblies:
    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.dll
    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Build.Client.dll
    • C:\Windows\Microsoft.Net\assembly\GAC_MSIL\
      Microsoft.TeamFoundation.Build.Workflow\v4.0_10.0.0.0__b03f5f7f11d50a3a\
      Microsoft.TeamFoundation.Build.Workflow.dl
    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.TeamFoundation.TestImpact.BuildIntegration.dll
    • C:\Windows\assembly\GAC_MSIL\Microsoft.TeamFoundation.TestImpact.Client
      \10.0.0.0__b03f5f7f11d50a3a\Microsoft.TeamFoundation.TestImpact.Client.dll
    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.VersionControl.Client.dll
    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.VersionControl.Common.dll
    • C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.WorkItemTracking.Client.dll
  6. Add references to TFS Build Extension components.
  7. Make a copy of the default build template and add it to the project.
  8. The completed solution should look something like this:clip_image003
  9. Open the template and add a new Tab to the Visual Studio Toolbox
  10. Select the new tab and choose to add new toolbox items
    1. Browse to the TFS Build Extension component you want to use and add the activities to the toolbox tab
  11. The new toolbox tab should list the selected activites:
    clip_image004
  12. Now you are ready to extend the workflow by adding new TFS Build Extension activities to the template!
    clip_image005 

A sample project with the above references added can be downloaded here: TFSBE.Template.zip.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>