Configure KDiff3 in Visual Studio


(original)

KDiff3 is a very good comparison and merging tool (You can find it at http://kdiff3.sourceforge.net/). For merging operations bewteen two branches, it allows to see the 3 source views : “base view” (or common ancestor view), “your local branch view” and the “target view”. Also, at the bottom, it displays the final result in the “merged view”.

The good thing is that if you are using Visual Studio with TFS as the source control system you can set KDiff3 up to help you during the comparison and merging operations.

In order to setup KDiff3 in Visual Studio (2005, 2008 or 2010) do as follow:

  1. From Visual Studio’s “Tools” menu, select “Options …”.
  2. Then select “Source Control \ Visual Studio Team Foundation Server” in the left treeview control.
  3. On the right side, click on “Configure user Tools …”
  4. Then enter the following options (by clicking on “Add”):
    • Compare
      • .*
      • Compare
      • C:\Program Files\KDiff3\kdiff3.exe
      • %1 -fname %6 %2 -fname %7
    • Merging
      • .*
      • Merge
      • C:\Program Files\KDiff3\kdiff3.exe
      • %3 -fname %8 %2 -fname %7 %1 -fname %6 -o %4

In the end it should look like this:

Advertisement
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: