[# VS2012] HowTo: Compare 2 files using Visual Studio from the command line



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


Saludos @ La Finca

El Bruno

image image image

Deja un comentario

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s