Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Cannot navigate to definition" annoyance in Visual Studio 2010

I just switched to Visual Studio 2010, and now whenever I select something, Ctrl+C to copy, click somewhere else, and Ctrl+V to paste, I get an error message "Cannot navigate to definition." After that, it I try it again, it works. What fantastic new 'feature' should I be turning off to stop this?

enter image description here

like image 448
Alain Avatar asked Oct 24 '11 20:10

Alain


2 Answers

Bah, it's a bug in Microsoft Productivity Power Tools for Visual Studio 2010. the "Ctrl+Click Go To Definition" feature. Apparently, when I click a new location and then press "Ctrl+V" - if I do it quickly enough, it interprets it as a Ctrl+Click and immediately tries to trigger a navigation, even if I clicked on an empty space. The error comes because it doesn't know what I'm trying to navigate to (answer: I'm not).

like image 120
Alain Avatar answered Sep 21 '22 14:09

Alain


I have/had similar issues in VS 2012 (Premium).

I've tried the following:

  • removed all bin and obj folders from project's folder: works most of the time.

  • repaired VS 2012 (add/remove bugrams (programs) > repair). Didn't help much.

  • Close and opened VS 2012: didn’t help much either.

  • I've noticed than I couldn't open only files that weren't check-in in TFS. I check-in them and then VS started working normally.

Dunno if this issue will appear again tough.

Hopefully this would help someone.

BR

like image 42
Blaz Brencic Avatar answered Sep 25 '22 14:09

Blaz Brencic