Using KDiff3 with Visual Studio 2010

For a long time I’ve hated the built in compare/merge tool in Visual Studio. If the changes are just somewhat complex, the compared result is really confusing and I have to spend alot of time trying to see what has changed.

I’m an big fan of the Windows Explorer (+ much more) replacement Total Commander and love it’s compare tool. But since it doesn’t work within Visual Studio I had to export the files from TFS and to the compare using Total Commander.

I started to investigate for a better solution…

The result was the free tool KDiff3 and some Visual Studio configuration:

  1. Download and install KDiff3
  2. In Visual Studio:
  • Tools > Options
  • Source Control > Visual Studio Team Foundation Server
  • Click button Configure User Tools
  • Click button Add, and fill in:
  • Extension: .*
  • Operation:Compare
  • Command: [browse to kdiff3.exe]
  • Arguments: %1 %2 -L1 %6 -L2 %7 -o %2

I have found similar posts about configuring KDiff3 in VS, but they’ve used different arguments. But I didn’t like those. If you want to try yourself, you can read this blogpost.