Basically, we are going to add a command line argument to the tool that Visual Studio uses to compare files. The tool is called diffmerge.exe, and we are going to add the /ignorespace argument when this is ran.
- Open Visual Studio.
- Navigate to Tools –> Options.
- Browse to Source Control on the left and click on Visual Studio Team Foundation Server.
- Click Configure User Tools.
- Click Add to create a new tool.
- Extension: .*
- Operation: Compare
- Command: [Your Visual Studio Location in Program Files]\Microsoft Visual Studio [Your Version]\Common\IDE\diffmerge.exe
- For example, C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\diffmerge.exe
- NOTE: If you have a 64-bit version of Windows, you should see two directories for Visual Studio (one under C:\Program Files\ and another one under C:\Program Files (x86)\). The diffmerge.exe file is located in C:\Program Files (x86)\Microsoft Visual Studio x.x directory.
- Arguments: %1 %2 /ignorespace
- NOTE: Your Arguments field may look a little different (i.e. %1 %2 %3 %4 /x /y), but don’t worry about what it looks like–you just need to be sure to add /ignorespace to the end of your arguments.
- Click OK to save and bingo–you’re done!