Visual Studio Development Bookmark and Share   
 index > Visual Studio Setup and Installation > Go To Definition isn't working anymore
 

Go To Definition isn't working anymore

I have a solution with about 5 projects.  Some of these projects refer to each other.  If I right click on a property or method and hit "Go To Definition", it takes me to the metadata for that item instead of the source code for it.  Now, that's if the property/method I'm trying to go to is in a different project.  If its in the same project, then Go To Defiition takes me right to the source code.  So again, if I right click on a property/method that's defined in a different project (within my solution), I get the metadata.

Its kinda like if you put a button on a form and go in your source code and do something with the button's BackColor property.  If you Go To Definition on the button's BackColor property, it'll take you to the metadata.  You don't have the soure code available for the button, so it gives you metadata.  That's what's happening in my solution now.
0to60  Wednesday, October 14, 2009 2:58 AM
Hi 0to60

It depends on how the referenced assembly is added to the project.

For example, here are two scenarios with different results "Go To Definition" will give you:
  1. If we use Add Reference...>> Projects (tab), it will show up the dlls current solution contains, even the dll has not been built yet.
    In this scenario, "Go To Definition" will bring you to the source code in the current solution.
  2. If we use Add Reference...>> Browse(tab)...
    In this case, "Go To Definition" will lead to the metadata of the assembly.

Thanks.

Figo Fei

MSDN Subscriber Support in Forum

If you have any feedback on our support, please contact msdnmg @ microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Figo Fei  Wednesday, October 14, 2009 9:24 AM
Hi 0to60

It depends on how the referenced assembly is added to the project.

For example, here are two scenarios with different results "Go To Definition" will give you:
  1. If we use Add Reference...>> Projects (tab), it will show up the dlls current solution contains, even the dll has not been built yet.
    In this scenario, "Go To Definition" will bring you to the source code in the current solution.
  2. If we use Add Reference...>> Browse(tab)...
    In this case, "Go To Definition" will lead to the metadata of the assembly.

The references are all Projects references, but it still doesn't work.
0to60  Wednesday, October 14, 2009 1:50 PM
Hi 0to60

What version and edition of Visual Studio are you using?
Does it happen all the time or on a sudden, to all the projects/solutions or just this project/solution?

If you don't mind, could you send the projects files to me: v-fifei[at]microsoft.com, so that I can try to reproduce on my side.

Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Figo Fei  Thursday, October 15, 2009 2:37 AM
Hi 0to60

What version and edition of Visual Studio are you using?
Does it happen all the time or on a sudden, to all the projects/solutions or just this project/solution?

If you don't mind, could you send the projects files to me: v-fifei[at]microsoft.com, so that I can try to reproduce on my side.

Thanks.

Its a pretty large solution with projects that contain references to third party components, so sending it to you won't be possible.

VS2008 v9.0.21022.8 RTM

Here's a little more information:
I use SourceSafe 2005 via the internet plug in.  If I were on the network with the SourceSafe database, I could add projects to my solution right out of SourceSafe.  But with the internet plug in you can't.  So what I do is create a new solution, add NEW projects, then bind them to my SourceSafe projects.  Then, the plug in will do a Get Latest for that project, thus overwriting the "new" project I created. 

I believe that somehow this roundabout way of adding projects from SourceSafe is causing my problem.  I can usually fix the problem by going to each project in the solution, removing the references to the other projects, and then re-adding them.  This usually fixes it, but not always.  I can check in those .csproj files, but then if someone else does a Get Latest, it'll happen to them.  They'll do what I did to fix it, and then it happens to me, and so on, and so on.
0to60  Thursday, October 15, 2009 3:29 PM

You can use google to search for other answers

Custom Search

More Threads

• VS 2008 hangs after every build for 15-20 seconds
• Distribution MS-Access database
• Runtime Error R6034 During Installation of Visual Studio 2008 Professional on Vista Enterprise X86
• Visual Studio 6.0 Installation
• Setting Visual Studio Default Projects Path for All Users
• Error While trying to install Microstoft .NET Framework 2.0
• Watch1 window showing but only shows Type column
• Visual Studio waits indifinitely after press "Build Solution"
• VS 2005 SP1 installation questions
• sending TARGETDIR property to msi for WebSetUp