Ctrl Left Click Wrong Location
We've just upgraded to Resharper Ultimate (2017.2.2) and VS2017 from VS2008 and Resharper 7.1.3 and I'm having some issues...
There seems to be a strange issue with Ctrl + Left Click (Go to declaration). Sometimes it will bring me right to where I expect it to (at the top of the method). Sometimes it seems to be 10 or 20 lines away.
And sometimes (rarely, and apparently randomly) it will navigate me to a completely different method in a decompiled class in some other library that I never clicked on. That is really really annoying. Here's an example I just tested:
My class has this method:
public void Stop()
{
Stop(new Tuple<ProgressForm, ManualResetEvent>(_dialog, null));
}
Somewhere else in my class I make a call to this Stop() method. I did ctrl + left mouse click and the following happened:
1. Brought me to the Stop() method.
2. Put cursor on the ManualResetEvent type.
3. Decompiled ManualResetEvent and in that decompiled class, the cursor is on the class name.
Obviously it should have just brought me to the Stop() method and put the cursor there.
I have cleared Resharper cache, but I don't know what else to do. VS2017 never had the old version of Resharper installed. Could there have been something the older Resharper stored in my solution file that I need to delete?
Please sign in to leave a comment.
Hello Dan!
Thank you for contacting us.
Could you please try disabling the following VS option - Tools | Options | Text Editor | Enable mouse click to perform Go to Definition and check if it helps.
Thank you.
I think that may have been the problem. Thank you.
Disabling the default VS "go to" option appears to have solved the issue for me too.
I thought we had fixed a very similar issue years ago, did VS2017 introduce something new and conflicting?
Hello Martijn!
Yes, that's right - Microsoft introduced its own Ctrl+Click feature in VS 2017 - https://youtrack.jetbrains.com/issue/RSRP-466327
Thank you.
Happened after running the VS upgrade to 15.4.4. Thanks for pointing me to the fix. -- Ken
Just to add to the behaviour of this, I find that if you Left Click your cursor onto the item first before Ctrl+Clicking it, it usually jumps correctly.
However, will switch off VS's version as suggested!
Just had the same issue with VS2019 Pro and ReSharper 2019.2.2
The problem occurred after going back from 2019.2.3 to 2019.2.2
Going into the ReSharper options and clearing the ReSharper cache solved the issue for me.