Hello!

Visual Studio 2013 file comparison tool can be considered “first citizen tool”. Before I used to use WinMerge, or another tool to compare.

What is still missing in the IDE is a small menu that allows us to select 2 files and compare them. From command line, you can do it with

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

And after launching a command like

devenv.exe /diff “e:\source.txt” “e:\target.txt” “SOURCE” “TARGET”

But within the IDE, things change a little. Instead of launching the command from the Command Prompt, we can do it from the command window with a syntax of style

> Tools.DiffFiles SourceFile, TargetFile

Live sample

2015 12 22 Compare from Command Window

Greetings @ Madrid

-Bruno

-El Bruno

References

8 responses to “#VS2015 – Compare 2 external files in Visual Studio from the IDE”

  1. Thank you for sharing this article. It was a slick tool that I never knew existed. I even love the intellisense on the file system, really COOL!

    Like

    1. Thanks Harry for the nice comment ! 😀

      Like

  2. Thanks, I’ve been looking for a way to do this in the IDE without having source control turned on.

    Like

  3. Juan Arango Avatar
    Juan Arango

    Nice, Thank you.

    Like

  4. is there any way to save the differences in some text file while using the devenv.exe command

    Like

    1. I don’t think so. There are other tools which allows you to save the diff.

      Like

Leave a reply to elbruno Cancel reply

Discover more from El Bruno

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

Continue reading