Mathias Olausson [MVP]

How to create a new project for the TFS Build Extensions

without comments

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.
  3. Make sure target framwork is set to .NET Framework 4
  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\
    • 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
    • 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:
  12. Now you are ready to extend the workflow by adding new TFS Build Extension activities to the template!

A sample project with the above references added can be downloaded here:

Written by Mathias Olausson

June 13th, 2011 at 3:41 pm

Posted in 11561,12010

Leave a Reply