Using Rider as Visual Studio comparison tool

Answered

I'd like to use Rider's file comparison from Visual Studio to diff and merge files.

Following https://www.jetbrains.com/help/idea/running-intellij-idea-as-a-diff-or-merge-command-line-tool.html I've added Rider to Path

From Visual Studio > Tools > Options... > Source Control > Visual Studio Team Foundation Server > Configure User Tools

 

I've then added for Compare (since you

Command: C:\windows\System32\cmd.exe

Arguments: /C rider diff %1 %2

Which works, though doesn't always bring the comparison window to the front and it would be nicer not to see the command dialog box

 

For Merge I've tried combinations around

Arguments: /K rider merge %1 %2 %3 %4

But it always says "Error showing merge: Can't find file C:\Users\<name>\AppData\Local\Temp\TFSTemp\vctmp13212_431775.cs" in Rider.

VS says "The manual merge for <file path> has been cancelled" when the command line closes (i.e. almost immediately with /C or when manually closed with /K)
I can run "rider merge file1 file2 file3" from the command line, so the basic merge command works.

Are there any suggestions on how I can get this to work?
Thanks

2 comments
Comment actions Permalink
Official comment

Hi Matthew. You could try replacing cmd.exe with rider.exe, this won't show a cmd window then. As for the missing files, does your user name have a space? You can try wrapping the args in quotes - rider merge "%1" "%2" "%3" "%4"

Comment actions Permalink

Hi Matt,

I originally tried just pointing at rider.exe, but that also gave a "Can't find file" when trying to diff if Rider was already open, while calling the rider.bat file works for diff whether Rider is open or closed. The merge command from Visual Studio doesn't seem to work either way.
My username doesn't contains any spaces, and Visual Studio won't let you put quotes around the %n arguments

0

Please sign in to leave a comment.