21 Feb 2011

Ignore White Space in Visual Studio - TFS built in compare tool

These are compare arguments for TFS comparer. Tools > options > source Control > VS TFS. It will ignore white space in comparison/merge window.

Here are the values for the fields to copy paste

Extension - .*
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\diffmerge.exe
Compare Args -
%1 %2 %6 %7 %5 /ignorespace /ignoreeol
Merge Args -
%1 %2 %3 %4 %6 %7 %8 %9 /ignorespace /ignoreeol /merge

For Visual Studiio 2008  use "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\diffmerge.exe".

Word of Caution: One problem I came across which you may also face while merging conflicts is that, if the conflicts are pertaining to white-space changes in either server or local code, it will say you that there are conflicts which cannot be auto-merged but when you open the conflict resolving screen, you won't see any conflicts as it has ignored white-space changes while comparing both the versions. So you may not want to use /ignorespace and /ignoreeol (ignore end of line) parameter in merge operation.

1 comment:

  1. Looks as you have to add /merge as option for the merge setting. If not you will get a compare while merging.....