shytikov
shytikov

Reputation: 9558

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

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?

Upvotes: 19

Views: 8036

Answers (9)

sjohns
sjohns

Reputation: 27

I encountered this issue while using Beckhoff's Visual Studio 2022 integration for TwinCAT 3. None of the other steps involving opening and closing files worked, so this Beckhoff case is likely a different issue than others who had the same symptoms.

The instructions on Beckhoff's help page here to export TcProjectCompare settings to a specific source-control plugin solved my problem. Note that in my case at least, the detailed steps were slightly different than Beckhoff describes:

  • TwinCAT -> TcProjectCompare must be accessed through the Extensions menu in the top bar of Visual Studio. Following this method, "Cancel" must be clicked on the window that pops-up in order to access the required settings menu.
  • The name has been changed from "User Tools" (on Beckhoff's help page) to "Usertools" (in TcProjectCompare).

Following the steps from the Beckhoff help modifies your Git config to set (among other things) diff.tool=TcProjectCompare and to set up the path difftool.TcProjectCompare.path=<your_path_here>.

Upvotes: 0

Artem Mishukov
Artem Mishukov

Reputation: 21

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.

Upvotes: 0

Thomas
Thomas

Reputation: 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.

Upvotes: -1

Michael Hutter
Michael Hutter

Reputation: 1542

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.

Upvotes: 1

ALomaka
ALomaka

Reputation: 40

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.

Upvotes: -1

Hakan Fıstık
Hakan Fıstık

Reputation: 19511

Restarting Visual Studio (2019) solved it.

Upvotes: 18

boyukbas
boyukbas

Reputation: 1235

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

Upvotes: 7

WiSeeker
WiSeeker

Reputation: 842

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

Upvotes: 13

Per-Frode Pedersen
Per-Frode Pedersen

Reputation: 1027

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

Upvotes: 2

Related Questions