visual-studiovisual-studio-2005vs-web-application-project

Problem with file name folding in Visual Studio Solution Explorer ("File Nesting")


(Edit for search-ability: called "File Nesting")

I'm not sure if "folding" is the correct term, but the feature I'm referring to is shown in the 1st image below, versus the 2nd one which does not have an expandable tree list node for the code behind file.

  1. Folding:

File Folding

  1. No folding:

No File Folding (files displayed separately)

My questions are:

  1. What is the correct name of this feature?
  2. How do I set it?
  3. Why does my Solution Explorer not have this feature enabled when I try to convert my Web Site Project to a Web Application Project?

References:

Edit

Thanks Sean, but as you can see below, my Nest Related Files button does show up in this project for some reason:

No "Nest Related Files" button

Should have button shown below:

Nest Related Files Button

Edit:

I figured out the reason: I accidentally created a C# Web Application Project, and then added VB ASP.NET files to it.


Solution

    1. It's called File Nesting.
    2. When a website project is selected in Solution Explorer, the third button in the Solution Explorer toolbar is for "Nest Related Files".
    3. A website project or project file must be selected in Solution Explorer (rather than the root Solution), for the button to appear in the toolbar. The command/tool button is not available when C++/C# projects are selected in Solution Explorer. I don't have a web app project to test but can only conclude that the command is not applicable to web app projects either.

    see this related question for a possible registry hack (changing 9.0 to 8.0 in the question's reg script): Visual Studio 2010 related file nesting