One usually has the need to compare two files or two folders, or two branches, especially as a frequent user of Visual Studio, one hopes to find a way to use Visual Studio to complete the comparison job in Visual Studio with somewhat the way like Source Control or Version Control software for comparison.
This article will cover this topic and related issues (we use the current version of 2019 16.11.0).
It seems this article is a little bit too long, I split it into two: one with native Visual Studio Tool, another is Visual Studio with Extension or Non-Visual Studio.
After splitting the article into two, they are still too long, I split it as three:
- Compare Files (1), with TFS and Git GUI in Visual Studio --- this article
- Compare Files (2), with Visual Studio Built-in Tool
- Compare Files (3), with Visual Studio Extension or Other Apps
Introduction
Contents of this article series,
- Compare Files (1), with TFS and Git GUI in Visual Studio
- TFS
- Git
- Compare Files (2), with Visual Studio Built-in Tool
- Command-line in Visual Studio
- Visual Studio Developer Command Prompt
- Windows Prompt
- Compare Files (3), with Visual Studio Extension or Non-Visual Studio Apps
- A: Tools outside of Visual Studio for Files Comparison
- Online comparison, such as diff
- Other Applications, such as VS Code or Word
- B: Visual Studio Extention for Comparison Tools from Third Parties:
- Code Compare in Visual Studio --- devart.com
- Compare Files VS2019 --- marketplace.visualstudio.com
- A: Tools outside of Visual Studio for Files Comparison
The Visual Studio only supports the GUI Compare Files feature to TFS or Git, the source control tools. We will discuss these features in the first article of this article series; and then as an alternative, we invoke the Visual Studio built-in Comparison Tools from the command line that we will discuss in the second article in this article series; and finally, we discuss the alternative ways to compare files without Visual Studio in the third article.
Compare Files (1), with TFS and Git GUI in Visual Studio
1, Under the Environment of TFS
We can compare any two files using the Compare dialog [Microsoft]. Under the environment of TFS:
On the menu bar, choose View, Other Windows => Source Control Explorer.









Join the conversation! Your thoughts help the community grow.