Friday, June 30, 2017

Comparing local files using VsDiffMerge

If you ever did a merge operation in Visual Studio and you had merge conflicts to resolve, know that you were using VsDiffMerge.exe behind the scenes. But did you know that you can use this tool as well to compare local files that are not under source control?

Let’s demonstrate…

The VsDiffMerge.exe tool can be found inside your Visual Studio directory (for VS 2017: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE)

To compare 2 files, you have to pass the filepath as an argument to the tool:

vsdiffmerge.exe" "File1" "File2"

An example:

vsdiffmerge.exe" "UnitTest1.cs" "UnitTest2.cs" starts up the Visual Studio IDE with “UnitTest1.cs” and “UnitTest2.cs” opened:

1 comment:

Anonymous said...

You can also use the Visual Studio Code CLI: