?
Solved

How can I get a Compare operation in TFS to ignore whitespace?

Posted on 2012-04-04
7
Medium Priority
?
1,399 Views
Last Modified: 2012-04-15
I'd like to set an option in TFS so that when I compare files, differences in whitespace are ignored.
0
Comment
Question by:jobrems
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 37809996
http://msdn.microsoft.com/en-us/library/6fd7dc73%28v=vs.80%29.aspx

Use the /ignorespace option:
/ignorespace     Does not highlight white-space differences between the compared files.
0
 

Author Comment

by:jobrems
ID: 37812073
where do I use that?
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 37813005
Here is how you use it
http://msdn.microsoft.com/en-us/library/6fd7dc73%28v=vs.80%29.aspx

ps.  The link is the same one as my earlier comment.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:jobrems
ID: 37813792
what I am looking for is a way to configure the Compare facility in TFS so that all compares are done ignoreWhitespace. In Visual SourceSafe, if you recall, there was a checkbox that could be selected which configured VSS to compare in this way. Is there no such option in TFS? It is not very convenient to have to run a command line everytime I want to diff files.
0
 

Accepted Solution

by:
jobrems earned 0 total points
ID: 37827998
I resolved my own question: install a file comparison program on your machine (such as Beyond Compare or ExamDiff). Integrate the program into Visual Studio by following these steps:
Tools > Options > Source Control > Visual Studio Team Foundation Server;
press the Configure User Tools... button.
For Extension, enter .*; for Operation, choose Compare;
for Command, enter path of executable (e.g., C:\Program Files\Beyond Compare 3\BComp.exe);
for Arguments, enter %1 %2 /lefttitle=%6 /righttitle=%7  /nobackups.

With these programs, it is easily possible to specify ignore whitespace (and many other options).
0
 

Author Comment

by:jobrems
ID: 37828046
please close this question and leave info in KnowledgeBase
0
 

Author Closing Comment

by:jobrems
ID: 37847972
I never got the answer I was looking for. So , I found a way to do it myself.
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question