[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vs2010 F12 does not take me to class definition

Posted on 2012-08-22
2
Medium Priority
?
513 Views
Last Modified: 2012-08-29
If I highlight a class and press the F12 key it brings me to its definition. If the class is in a differnt Project it displays the object browser. My solution contains both projects. Is there any way to display its definition even though its in a different project?
0
Comment
Question by:glenn_r
2 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38322812
How do you reference the other project? Did you add a project reference or an assembly reference? I think this would happen if you added an assembly reference.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 585 total points
ID: 38323180
If you simply 2 projects in Visual Studio, their source code is not linked by default. They are 2 different projects that you simply wanted to load in 1 shot when opening the solution.

When you press F12, it works only on the source code available to the current project.

In order to "link" the source code of one project to the other and have F12 see both when activated, the project in which you press F12 needs to reference the source code of the second project. By default, references are made to the compiled assembly, not the source code.

To have the behavior that you want, you must first remove the already existing reference in the References window. Then, recreate the reference, but be careful to select the referenced project through the Projects tab of the window instead of the .NET or Browse tab.

That approach can lead to problems however if you work in an environment where another programmer might be working on the source code of the referenced project at the same time as you are.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question