Index > Visual Studio > Go to Definition (F12) opens Object Browser ins...

Visual Studio:  Object Browser

Go to Definition (F12) opens Object Browser instead of Code View

How to make "Go to Definition" (F12) go to the definition in code view rather than opening Object Browser.

Added on 18 Jun 2008


Scenario Summary:
Even though a method lives in the same project as the one that is calling it, the Go To Definition feature opens up Object Browser rather than opening up the VB class file.
Scenario Details:
Added on 18 Jun 2008

Solution Summary:
Create seperate class libraries and user control libraries, add these projects to the web application solution, and add references to them.
Solution Details:

While Visual Studio 2003, compiled the entire application into a single assembly, Visual Studio 2008 seems to create seperate assemblies for each User Control.  The fact that referenced code is in another assembly from the one you are working on causes Object Browser to open instead of code as you can only jump to code within the current assembly or assemblies that are being referenced.

The solution is to create a new user control library, add it to your solution and add a reference to the project.  If the app_code is used by the user controls (in your new library) as well as the web application, then you will need to create a separate class library and add a  reference to that library in the Web application project and  the User Control Library.

Related Links
Creating and Using User Control Libraries
A step-by-step tutorial on creating and consuming a user control library in your web application solution.

Was this solution useful? Yes No Added on 18 Jun 2008

Copyright 2017 © E-Centric, Inc. | Terms of Use