Use your own file compare tool in Visual Studio

Which file compare software are you using for comparing files and folders? How do you like it?

I ever tried several ones, include:

  • WinDiff: comes along with the Windows SDK, I think it is the build in file compare tool of Visual Studio(TFS).
  • TortoiseMerge: build in file compare tool of TortoiseSVN.
  • WinMerge: an open source differencing and merging tool for Windows.
  • Beyond Compare: commercial, powerful.
  • FCU: File-Compare Utility, light-weighted, freeware.

Honestly, each of above is good enough for me, but it’s a problem when I have choices: FCU is green(no need to install) and fast, but less features. Beyond Compare is really powerful, but it isn’t free.

Eventually, after tried them for a while in my daily work, I found that for comparing files, TortoiseMerge is the best, and WinMerge is the best for comparing folders.

Now the question is, I don’t like the build in file compare tool of Visual Studio, because:

  1. It ignores blank lines by default, and I don’t want to waste my time on changing the settings for each of my computers, or each time I reinstall the Visual Studio.
  2. If you renamed a variable, or removed/added a white space in a line, what you can get from it is “The line has been changed”, but I want more details.
  3. The colors of default settings are monotone, and I don’t know how to change them.

VS_BuildIn_FileCompareTool 

TortoiseMerge is much better:

TortoiseMerge

So can I use my own tools (TortoiseMerge) for comparing files in Visual Studio(TFS) ? 

Surely I can, now let’s do it:

  1. Visual Studio->Tools –> Options –> Source Control –> Visual Studio Team Foundation Server.
    ConfigStep1
  2. Click Configure User Tools button, a dialog will be shown, click Add button on it.
    ConfigStep2
  3. Enter the settings properly. I choose “.*” as the extension here because I want to compare all kinds of files with my file compare tool.
    For the “Arguments”, usually we don't need to change it.
    ConfigStep3
  4. Save the settings.

That’s it, now TortoiseMerge is the default file compare tool of Visual Studio.

Enjoy it :)

posted on 2009-08-13 12:47 BFL 阅读(2065) 评论(10) 编辑 收藏

http://www.cnblogs.com/BFLForever/