Create and Work with a Custom Build Process Template

If the build process capabilities of the Default Template do not meet your team's needs, you can create your own richly customized build process template.

In this topic

  • Create a New Build Process Template

  • Register a Build Process Template with the System

  • Work with Build Process Templates

Required Permissions

To perform the following procedures, you must have the Edit build definition permission set to Allow. For more information, see Team Foundation Server Permissions.

Create a Build Process Template

To create a custom template

  1. In Team Explorer:

    1. If you are not already connected to the team project that you want to work in, then connect to the team project.

    2. Choose Home iconHome, and then choose Builds IconBuilds.

    3. On the Builds page, choose New Build Definition.

    A new build definition window appears.

  2. In your new build definition, specify build process options on the various tabs. For more information, see Create a Build Definition.

  3. On the Process tab, choose Show details, and then choose New.

    The New Build Process Template dialog box appears.

  4. Choose Copy an existing XAML file and optionally, modify the folder and file name. Choose OK.

  5. On the menu bar, choose File, SaveName of your build definition (Keyboard: Ctrl+S).

  6. In the build definition window, below the Build process file menu, choose the hyperlink that contains the name of your template.

    The folder that contains your new template appears in Source Control Explorer.

  7. On the shortcut menu of your new template, choose Get Latest Version.

  8. On the shortcut menu of your new template, choose View.

    The Workflow Designer appears.

  9. In the Workflow Designer, edit your template.

    For more information on how to work with your template, see Work with Build Process Templates.

  10. After you have finished editing your template save it and close the designer.

  11. On the shortcut menu of your new template, choose Check In Pending Changes.

    The Check In dialog box appears.

  12. Choose Check In.

Register a Build Process Template with the System

You can register build process templates created outside your team project. For example, you may have received a build process template from a colleague in e-mail and checked it into the BuildProcessTemplates folder in your team project's version control system.

Before you and others on your team can use the build process template to create build definitions, you must register it with the system.

To register a build process template with the system

  1. In Team Explorer:

    1. If you are not already connected to the team project that you want to work in, then connect to the team project.

    2. Choose Home iconHome, and then choose Builds IconBuilds.

    3. On the Builds page, choose New Build Definition.

    A new build definition window appears.

  2. On the Process tab, choose Show details, and then choose New.

    The New Build Process Template dialog box appears.

  3. Choose Select an existing XAML file.

  4. Choose Browse.

    The Browse dialog box appears.

  5. Use the Browse dialog box to locate and select the custom template that you want to register.

    Your new build process template is now displayed in the Build process file list and can be used by you or others on your team to create build definitions.

Working with Build Process Templates

Following are some recommendations and tips that can help you be more successful in working with build process templates:

  • The Team Foundation Build activities are the fundamental components of the build process. You can re-use these activities to create a custom build process. For more information, see Team Foundation Build Activities.

  • We recommend that you do not modify the Default Template. Instead, create a template based on one of these templates, as described in Create a New Custom Build Process Template.

  • You can register a build process template with more than one team project. This capability means that you can share a build process across any team project in the team project collection that contains your template. For more information, see Register a Build Process Template with the System.

  • If you need to modify a build process template, you should plan to review all build definitions that are based on the template and correct them after you have completed your changes to the build process template. If you do not do this, your build definitions may fail or function in an unexpected way.

  • If you decide to delete a build process template, first make sure that you locate and delete all build definitions that are based on the template. When you delete the template, any remaining build definitions based on the template will no longer function.

  • For general information about how to use the Workflow Designer, see the following pages on the Microsoft website: