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.

4 comments:

123 123 said...

Nice article as for me. I'd like to read something more about that matter. Thnx for sharing that info.
Sexy Lady
English escorts

Venki said...

Great.. this was most annoying... Thanks for sharing..

Lukas said...

Great! This was, what I'm searching for.
Could you please fix the option in your text? You wrote /ingorespace instead of /ignorespace.
I just copied it and was wondering why it does not work...

Anonymous said...

Great - thanks for the fix! I wonder why MS made the Source Control arm of TFS so clunky? They are not going to make any progress against ClearCase.