Associate a file type with a merge tool

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Visual Studio 2019 | Visual Studio 2022

The Team Foundation Version Control diff/merge tool opens when you try to compare two files or two versions of a file, or when you try to do a manual merge of a file that has conflicting changes.

The tool is compatible with text and XML based files, but to associate a specific file type or set up a third-party merge or diff tool, you can use the following procedure.

Prerequisites

You must be a member of the Administrators or Users security group on the computer where Visual Studio is installed. For more information, see Permissions and groups reference.

Associate a file type with a merge tool

To associate a file type with a merge tool, you can start from the developer command prompt or from Visual Studio.

Developer command prompt

  1. In Windows, select Start and then type Developer Command Prompt. From the search results, select the developer command prompt for your Visual Studio version, such as Developer Command Prompt for Visual Studio 2022.
  2. In the command prompt window, enter tf diff /configure.
  3. Follow the instructions to configure the tool.

Visual Studio

  1. In Visual Studio, select Tools > Options.
  2. In the Options dialog box, expand Source Control, and then select Visual Studio Team Foundation Server.
  3. Select Configure User Tools.
  4. Follow the instructions to configure the tool.

Configure the tool

  1. In the Configure User Tools dialog box, select Add.

  2. In the Configure Tool dialog box, in the Extension field, enter the file extension you want to associate, such as .cpp, or * for all files.

  3. For Operation, expand the dropdown list and select Merge.

  4. In the Command text box, either enter the path and name of your merge tool, or choose the ellipsis to browse to and select the tool.

  5. In the Arguments text box, enter any arguments that your tool requires.

    Choose the arrow next to the Arguments box to select from a list of variables that the diff/merge command populates and passes to the tool. Any other text in the argument box passes to the tool directly.

  6. Select OK.

  7. Select OK again, or select Add to add more file extensions. When you're finished adding extensions, select OK.