1

I'm trying to set up vsDiffMerge (from Visual Studio Professional 2017) as my external merge/diff tool for SourceTree. However, when I try to resolve merge conflicts with the external tool, nothing happens. I know I got it to work before, but I had to reinstall Sourcetree recently, and now I can't get it to work.

Following the instructions in this article, I went to Tools > Options > Diff. I set the following:

  • External Diff Tool and Merge Tool both to Custom
  • Diff Command and Merge Command both to "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe"
  • Diff Command Arguments to "$LOCAL" "$REMOTE" "Source" "Target" //t
  • Merge Command Arguments to "$LOCAL" "$REMOTE" "$BASE" "$MERGED" //m

When merging, I right-click on a file with a merge conflict and choose Resolve Conflicts > Launch External Merge Tool. I see the "Visual Merge In Progress" message briefly and I can see in SourceTree that the temp files (the ones suffixed _BACKUP, _BASE, and _LOCAL) are created, but soon after the message goes away and the temp files disappear without the merge tool ever opening, leaving the conflict unresolved. The same happens whether I already have Visual Studio open or not.

I also tried swapping the order of $REMOTE and $LOCAL per this answer, but with the same results.

Is there something wrong with the way I have it set up? Is there anything else I should check or try?

1 Answer 1

0

I also tried this way on a fresh installation and it doesn't work...

You can however set Visual Studio to be the external merge tool in your git settings from Visual Studio:

  1. Go to "Team Explorer" in Visual Studio
  2. Select any repo
  3. Go to "Settings" -> "Global settings"
  4. At the bottom under "Diff & Merge Tools" you will be able to select "Use Visual Studio": enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .