In this tutorial, I’ll explain how to export and import build definitions in TFS 2015.

To export/import our build definition, we have to install a plug-in, as there is no built-in way to do that currently.

STEP 1 - Download Extension

  1. Open TFS and click on "Browse for Extensions" on the extreme right side, as shown below.
    TFS
    TFS
  1. Download the extension from Visual Studio Marketplace.

    TFS

Using this extension, you are able to export your build definition and then import it in the same or another team project or even different collection/account.

On clicking "Install", it will ask to select the collection. Select Project collection and click on "Continue".

TFS

TFS

TFS

To Start

Once you install the extension, go to Builds hub and right-click on any build definition. You will see two new menu items - Export and Import.

TFS

Export build definition

Step 1

Right-click and click Export on the build definition you would like to export.

TFS

Step 2

You will be prompted to save the definition as a file.

TFS

Step 3

Save the file with JSON extension.

TFS

Import build definition

Step 1

Right-click on "All build definitions" or any existing build definition and click on Import.

TFS

Step 2

You will be prompted to upload a build definition file.

TFS

Step 3

You can either drag and drop a file or use the Browse button to select the file you want to import.

TFS

Step 4

Click Import. If the import is successful, you will have your build created with all your steps, variables, schedules, and other build definition parameters.

TFS

Constraints