Wednesday, March 18, 2009
Whitespace in Team System Compare Results
Why do VSTS diff results include whitespace?
A teammate of mine shared a great tip with me during a merging exercise the other day. We noticed many differences shown in a file comparison that didn't seem different to us. It was simply whitespace that was causing the comparison tool to show more differences than would actually matter to the compiler.
He then recommended creating the following setting buried deep in the chasms of Visual Studio in
Tools -> Options -> Source Control -> Visual Studio Team Foundation Server -> Configure Users Tools.. -> Add ->
It's the "%5 /ingorespace" ending that differentiates the new Compare behavior from the out-of-the-box results. Now a Compare action will create results that you might expect - only the differences the compiler cares about.
James Manning has a great blog post explaining all the options and further Visual Studio configuration for compare tools.