Compare Any Two Files You Want With Visual Studio 2022

Software category image

Since Visual Studio 17.7 you can finally compare any two files you want. Here is how you do it!

Until now, you had to rely on external diff tools to compare two unrelated files. Visual Studio only supported comparing previous versions of files. However, since version 17.7, you can now compare any two files you want.

To compare files in Visual Studio, select the first file in the Solution Explorer, then press the CTRL key while selecting another file. Right-click and select Compare Selected from the context menu. This opens a new tab that displays the contents of the files side by side.

Here is a short demo video:

Demo video of how to compare two files in Visual Studio 17.7
Demo video of how to compare two files in Visual Studio 17.7

Find more tips for Visual Studio here: