IntelliJ Rider always has two of the same target when I Go To Declaration/Implementation
Asked Answered
M

4

10

When I Ctrl+Click a method or class in IntelliJ Rider, I'd expect it to go that class/method. However, instead it brings up a "Select Target" dialog which always has two copies of the same class in it. Choosing between two of the same class is a pretty dumb step - does anyone know how to get rid of the second copy of the class so I can just go straight to the class without having to choose?

Screenshot of the behavior below:

enter image description here

Monikamoniker answered 3/8, 2021 at 21:35 Comment(0)
G
5

File -> Invalidate Caches... -> Uncheck optional checkboxes -> Invalidate and Restart

Invalidating only ReSharper caches and restarting helped me for Rider 2021.3.3.

enter image description here

Godchild answered 31/3, 2022 at 5:52 Comment(3)
This seems to have fixed the issue this time around!Monikamoniker
it comes back after restart, usually happens after debugging,Pencel
Yeah, it keeps coming back. I've seen up to 3 instances of the same item in the Select Target box. It's really annoying having to click several times for something as basic as going to a function definition.Inessa
M
0

Rider just released an update today that fixed this. Huzzah!

Monikamoniker answered 5/8, 2021 at 0:32 Comment(3)
I'm having the same issue right now, any idea what changed ?Unfeeling
@Unfeeling Sadly Rider has degraded back to this for me as well after a recent update.Monikamoniker
I think it's not the update that is fixed the problem but rather a cache invalidation that should occur when the update is installed. I tried to invalidate caches manually and it helped, like @Godchild suggested in his answer.Sacchariferous
C
0

You just need to disable two booleans:

  • "Show non-public compiled items in 'GoTo...' results"
  • "Decompile methdods" in File/Settings/Tools/External Symbols

screenshot

Cymry answered 24/6, 2024 at 10:40 Comment(0)
R
-2

I resolved it by uninstalling Resharper.

Rhatany answered 17/10, 2022 at 15:34 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Coenzyme
Don't think this is a valid solution. I'd like to continue using Rider/ReSharper, not getting rid of it completely because of some inconvenience.Sacchariferous

© 2022 - 2025 — McMap. All rights reserved.