When you compare two versions of MS Word doc/Excel book in Team Foundation Server Source Explorer, the result is the boring “Binary filles differ” dialog.
It does not have to be that way though. The relevant apps (Word/Excel) have an excellent built-in diff interface. You can witness it when you work with versioning-enabled SharePoint file library and do compare with a previous version. Also, TortoiseSVN brings it up when you do diffs.
Question – can I enable this in TFS?
You can configure comparison (diff) and merge tools per file type (extension). This is available via Tools -> Options -> Source Control -> Visual Studio Team Foundation Server -> Configure User Tools” button or via the command-line with
tf diff /configureIn order to set up a comparison tool, you’ll specify the extension (use
.*if you want it to be used for all files not otherwise specified), the operation you’re setting up (Compare or Merge), the command to invoke and the arguments to the command. For arguments, the variables available for use are the following:To use TortoiseSVN — which seems like it does what you want — you would specify the command as the file path to
TortoiseMerge.exeFor comparisons, specify the arguments:
/base:%1 /mine:%2 /basename:%6 /minename:%7For merges, specify the arguments:
/base:%3 /mine:%2 /theirs:%1 /basename:%8 /minename:%7 /theirsname:%6 /merged:%4 /mergedname:%9This and other information on the arguments for various merge tools (including other word comparison tools like
DiffDoc.exe) can be found on James Manning’s MSDN blog. You may also find use in another stackoverflow question on invoking the word comparison tool from the command line.