Reputation: 9558
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
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:
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
Reputation: 21
Beckhoff TwinCAT 3 (Visual Studio 2022) specific solution that worked for me:
Upvotes: 0
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
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
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:
Upvotes: -1
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
Reputation: 842
If anyone lands on this question for the same issue (like I did), VS 2015 has ability to configure under Git Settings.
Upvotes: 13
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