image

Buenas,

some time ago I spoke of the possibility of Configure WinMerge to be used as a tool by default for Diff and Merge within Visual Studio 2010. With Visual Studio 2012 has been incorporated a new Diff and Merge tool that the truth is that it works very well (something talked here about this new tool)

Now, if we want to compare 2 files in a simple way, because the IDE is not all intuitive to find this option.Fortunately, the command line gives us the answer in the following format:

devenv.exe/diff Compares two files. Takes four parameters:
SourceFile, TargetFile, SourceDisplayName (optional),
TargetDisplayName (optional)

And then launch a command of style

C:\Program Files (x 86) \Microsoft Visual Studio 11.0\Common7\IDE > devenv.exe/diff
“e:\source.txt” “e:\target.txt””SOURCE””TARGET”

We will see something similar to the following

image

Saludos @ La Finca

El Bruno

image image image

One response to “[# VS2012] HowTo: Compare 2 files using Visual Studio from the command line”

  1. […] Compare 2 files with Visual StudioĀ usingĀ Command Line […]

    Like

Leave a reply to #VS2015 – Compare 2 external files in Visual Studio from the IDE | El Bruno Cancel reply

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading