How to: Compare Two Files

Compare allows you to see the differences between two server files, two local files, or a server file and a local file. You can also use Compare to compare two folders.

For more information, see How to: Compare Two Folders.

Required Permissions

To perform these procedures, you must have the Read permission set to Allow. For more information, see Team Foundation Server Permissions.

Note

To compare two local files, you do not need Team Foundation Server permissions.

To compare two files

  1. On the View menu, click Other Windows, and then click Source Control Explorer.

  2. In Source Control Explorer, go to the version of the file you want to compare, right-click, and click Compare.

    Note

    As an option, you can right-click a file in Solution Explorer and click Compare.

    The Compare dialog box appears and the local path to the file you selected is in the Source Path box.

  3. Enter the Target Path or click Browse and go to the target folder.

  4. Under Target Version, select the Type you want to use for comparison: Changeset, Date, Label, Latest Version, or Workspace Version.

  5. Click OK.

    If the files have no differences, the Microsoft Visual Studio dialog box appears informing you that the files are identical, click OK.

    Otherwise, a difference window displays the files side by side.

See Also

Tasks

How to: Compare Two Folders