Microsoft Git Provider and Visual Studio 2012 failed to start the configured compare tool
Asked Answered
G

8

17

I'm working with Visual Studio 2012 Update 2 and I have installed the official Visual Studio Tools for Git. But when I try to diff the modified file, Visual Studio shows this error:

Failed to start the configured compare tool.

But it seems there is no configuration for the compare tool in Git provider!

What should I do to solve the issue?

Guss answered 6/3, 2013 at 9:18 Comment(3)
Try to open Visual Studio as administratorSpud
Using VS2022, fixed after update VS to 17.5.4Hitandmiss
I have similar problem in VS2022 V17.8.4 :(Danedanegeld
N
17

Restarting Visual Studio (2019) solved it.

Nobie answered 12/3, 2021 at 14:16 Comment(3)
Still same problem in Visual Studio 2022. Your solution works.Rehearsal
Didn't work for me on VS2022.Danedanegeld
@Danedanegeld try other answers, maybe they can be helpful for youVenitavenite
D
13

If anyone lands on this question for the same issue (like I did), VS 2015 has ability to configure under Git Settings.

enter image description here

Diplopod answered 12/3, 2016 at 2:7 Comment(4)
This only displays the configuration, but does not let you edit it. You can change the settings by editing this file: C:\Users\username\.gitconfigCottle
This will in fact allow the settings to be changed and it does update the .gitconfig file but I still get the error even after restarting VS and even after a reboot.Wendelina
In my case I had to open Visual Studio as administrator, because the merge tool tried to create a temp directory in CSpud
@Toscanelli, thanks, also had to run it as admin.Olivine
P
7

I noticed that when you restart your VS (1), if you try to see the changes on a file that you didn't open/load, diff tool gets confused. For me restarting is the problem

My solution: Just open/load that file in VS, then try again.

(1): I am using VS2022 but seem like it happens for all versions

Patrinapatriot answered 11/4, 2022 at 16:3 Comment(0)
R
2

Make sure that you've set diff.tool for the git environment that visual studio uses. Normally you find this by starting Git bash from the start menu. If you use other git tools, you must set this for the global scope:

git config --global difftool.vs11.cmd "c:/program files (x86)/microsoft visual studio 11.0/common7/ide/devenv.exe" '//diff' "$LOCAL" "$REMOTE"

git config --global diff.tool vs11

Rael answered 7/6, 2013 at 12:13 Comment(0)
M
1

I had exactly the same problem. In my specific case I use Beckhoff TwinCAT 3 (Visual Studio) and got the error message

"Quellcodeverwaltung - Git / Fehler beim Starten des konfigurierten Vergleichstools"

In English this means "Failed to start the configured compare tool."

I figured out that I get this message every time, when I try to compare a file which is already open in Visual Studio.

Solution: First close the file, after that do the compare of this file

Closing the project or restarting Visual Studio only helps if Visual studio is configured not to reopen the last opened session/files. That explains, why some people had success by Restarting Visual Studio and others not.

Montpellier answered 3/1, 2023 at 9:31 Comment(0)
A
0

Beckhoff TwinCAT 3 (Visual Studio 2022) specific solution that worked for me:

  1. Open TwinCAT -> TcProjectCompare.
  2. Select Tools -> Configure User Tools....
  3. Select GIT as plugin
  4. Select Configure for: Specific project, then select project folder (not sure why, but it didn't work globally).
  5. Click Ok, then click Ok again.
Adaline answered 30/4 at 13:44 Comment(0)
S
-1

Happened to me in VS2022 and the fix was also to restart, but not just the instance of VS where I was encountering the problem, I had to restart all running instances. Additional data points:

  • My global git compare tool was already properly configured
  • VS was running elevated
  • Within the instance exhibiting the problem, only some files would trigger it; others would compare fine. And other running instances of VS could also compare fine.
Suspect answered 1/7, 2022 at 21:14 Comment(2)
You don't have to run VS elevated.Constance
I even re-started Windows (and therefore all VS instances) but it did not help :(Danedanegeld
A
-1

I had the same issue with TwinCat. Closing just the files to be compared helped. Additionally it was helpful to export the TwinCat compare tool configuration locally in the project folder instead of global.

Altman answered 19/9, 2023 at 12:24 Comment(1)
Closing the file did not help me :(Danedanegeld

© 2022 - 2024 — McMap. All rights reserved.