Where is the class view for code by file in VS 2005

I cannot find any of my code behind the files in the class tab. I can see other classes that I added, but none of the files containing the code. Is there a reason for this? Am I missing a customization or something else? It is very annoying trying to constantly work its way through the code.

I can see that all the other classes are just fine and not my code behind the files.

+1


a source to share


4 answers


The View class is designed to provide a hierarchical representation of the "symbols" defined in your project. For website projects, it will only list referenced assemblies and any classes defined in App_code.

So, no, you won't miss the tweak. You're missing the point of the class window! ;-) Maybe you should look in Solution Explorer.

By the way, if you're having trouble navigating through your code files, you should consider better organizing your files (e.g. in folders).

Edit (after Bounty was posted in this question ... drool!):


Ok I have VS 2005 SP1. I've tried the following cases:



and. Create a new site (VB or C #):

The Class View window is empty until you add a folder App_Code

. When added, the Class View displays all the classes added to the App_Code folder and the default Project links (System, System.Web, etc.). However, it does not display classes behind the page code.

b. Create New Project -> Web -> ASP.NET WebApplication:

The Class View window is automatically populated with project references and page code classes. This happens before I add the folder containing the class files.

I'm not sure if you are familiar with ASP.NET Web Application Projects. If not, you need to install the VS 2005 service pack. You can get it here . Alternatively, you can also install the web application extension.

+6


a source


Do not post classes other than the page maintaining class in code. Place all other code in a separate library project, or at least in the App_Code folder.



+1


a source


There should be a dropdown menu right above the code. On the left are the classes in your open file, and on the right are the members of the selected class.

A great way to navigate code in Visual Studio is with a right-click context menu. Go to the Definition section and navigate to the declaration parameters.

You can also use Reflector in your assemblies to view the class / member hierarchy in the tree.

+1


a source


VS 2008 improves the class's presentation to what you want ... just to put it.

Edit: Nevermind, VS2005 should do what you want. You can also use the Object Browser.

0


a source







All Articles