It can also compare files that are not part of your projects. Tools.DiffFiles will also help you auto-complete paths to the files you wish to compare. That is it, using this you can compare two files within Visual Studio. Which will give you the following window, where you can easily see the differences in the two files: You can easily compare the two files using the following command: If you have two classes in your solution as in the below image: ![]() ![]() This will give you the same view as the file differ extension, again this looks just like when you compare different versions of a file under source control. You can tap into the functionality that Visual Studio uses to compare files by using the Tools.DiffFiles command. I first wrote about this method back in 2019. This is my favourite way to compare files in Visual Studio, the only downside is that you need an extension. You will have to restart Visual Studio, after this you can select two files in Visual Studio's solution explorer and compare them as seen below: You can install the extension by going to:Įxtensions -> Manage extensions -> Online -> Search for "file differ" -> install ![]() This will show a comparison just as if you were comparing files in source control. This is a simple extension that allows you to select two files, right click and hit compare, just like in Visual Studio code. Mads Kristensen has made a lot of great extensions for Visual Studio, one of them is the file differ extension.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |