Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Visual Studio (vsdiffmerge) as external diff tool in SourceTree for Mercurial?

Tags:

I am using Mercurial for my source control and SourceTree to manage it. I want to use Visual Studio's built in diff and merge tool (vsdiffmerge) for comparing files however this is not working.

I am currently using the following:

Diff Commands:

\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsdiffmerge.exe\"

Diff Arguments:

\"$LOCAL\" \"$REMOTE\" //t

Merge Commands:

\"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\vsdiffmerge.exe\"

Merge Arguments:

\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m

enter image description here

The Visual Studio diff tool is not getting launched. Could you please take a look?

Update:-

   We should use like below:-    Diff Command:     full path of vsDiffMerge.exe    For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7\IDE subfolder. Visual Studio 2017 has it slightly more hidden. Look under Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer.      Diff Argument: "$LOCAL" "$REMOTE" "Source" "Target" //t    Merge Argument: $LOCAL" "$REMOTE" "$BASE" "$MERGED" //m 
like image 296
Sombir Kumar Avatar asked Oct 05 '15 12:10

Sombir Kumar


People also ask

How do I change the diff tool in Visual Studio?

To integrate Code Compare into Team Foundation Server, open the Visual Studio options (Tools → Options). In the displayed dialog box, select the Source Control → Visual Studio Team Foundation Server node. Click the Configure User Tools button to set up diff and merge tools.

How do I add a Diffmerge in SourceTree?

SourceTree config First, open up the options window and go to Diff tab. Change both External Diff Tool and Merge Tool to Custom. In the Diff Command field enter the full path to the vsdiffmerge.exe. For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7\IDE subfolder.


1 Answers

For Visual Studio 2019 Enterprise vsDiffMerge.exe location is:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe

like image 157
Ben Sampica Avatar answered Oct 10 '22 23:10

Ben Sampica