Can I use WinMerge as a merge / diff tool in Visual Studio?

I need to compare two files in my project, which is written in C #. Is it possible to integrate WinMerge (or any other diff tool) with Visual Studio and is it easy to use from the inside?

+2
visual-studio-2010 winmerge tfvc
source share
2 answers

I use WinMerge to compare files, and I integrated winmerge with visual studio. To do this, follow this instruction:

  • in the visual studio, select: Tools > Options
  • from this dialog box, select: Source Control > Visual Studio Team Foundation Server

here you must select Custom Instrument Setup , and then select Add . then from the open dialog box, enter. * in the "Extension" field and set "Operation for comparison and in the" Command "field, enter the WinMerge executable path and select" OK ".

what all:)

+2
source share

There is a more detailed answer to the life and technology of paulbouwer.com Replace the diff / merge tool in the Visual Studio Team System with WinMerge , also having the arguments you need to pass.

I will reproduce it completely, because I could not explain it better than him:

Replace diff / merge tool in Visual Studio Team System with WinMerge

JANUARY 31, 2010

I have been using Visual Studio Team System 2008 for some time and am really starting to love the tightly integrated control and work item functionality. I can't get used to the diff / merge basic tool.

Where is the part located?

The screenshot below shows the basic nature of the diff tool built into the Visual Studio Team System. There is no indication of the number of differences between different files or even the actual differences on a particular line ... Visual Studio Team System Diff Tool

Winmerge

There is an alternative, and it is open and free! From the WinMerge website:

WinMerge is an open source demarcation and merge tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and process.

Download WinMerge and install it.

Visual Studio Setup

Go to Source Management> Visual Studio Team Foundation on the Services menu > Options in Visual Studio.

Tools> Options> Versioning> Visual Studio Team Foundation

Click Customize User Tools ... and the Customize Custom Tools dialog box will become available.

Customizing custom tools ...

Add WinMerge data for the comparison tool. Click the Add ... button in the Configure Custom Tools dialog box and configure as shown in the screenshot below. The arrow button next to the argument text box provides information about the information that Visual Studio can provide to a custom tool.

The configured arguments are below: /e /u /wl /wr /dl %6 /dr %7 %1 %2

Set up a comparison tool

Add WinMerge data for the merge tool. Click the Add ... button in the Configure Custom Tools dialog box and configure as shown in the screenshot below. The arrow button next to the argument text box provides information about the information that Visual Studio can provide to a custom tool.

The configured arguments are below: /e /u /wl /dl %6 /dr %7 %1 %2 %4

Set up a tool for a merge operation

Comparison and merge operations should now be configured to use WinMerge.

Customized Custom Tools

WinMerge Command Line Options

WinMerge contains a number of command line options . Listed below are the ones used in the above configuration.

/ e Allows you to close WinMerge with a single press of the Esc key.

/ u Prevents the addition of WinMerge left or right side path to the list of most recently used (MRU).

/ wl Opens the left side read-only.

/ wr Opens the right side for read only.

/ dl Description for the title bar of the left side.

/ dr Description for the title bar of the right side.

Finally worthy of diff!

Now the comparison in Visual Studio is more significant, it shows the number of differences, their positions in the compared files and the actual differences in the line. WinMerge supports custom syntax coloring and color difference.

Visual Studio Command System with WinMerge

PERSONAL NOTE:

I tested it and I was unable to make changes to my local file, so I followed Youen's advice on this page about removing the \wr option for the comparison operation, and now it works fine!

+4
source share

All Articles