Search code examples
visual-studiovisual-studio-2008

Collapsing Related Files in Visual Studio


In Visual Studio as most of you will have noticed that related file can be collapsed in to one. E.G.

  • Form1.cs
    • Form1.Designer.cs

I'm creating a DAL library and will be splitting partial classes in to several files such as:

  • SomeTableClass.cs
    • SomeTableClass.Generated.cs
    • SomeTableClass.SomethingElse.cs

Is there any way in Visual Studio to recognise these file are related to each other an create the collapsible effect?

Thanks

Tony


Solution

  • In my (VisualStudio 2005) system, they are stored in the registry under

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects\{E24C65DC-7377-472B-9ABA-BC803B73C61A}\RelatedFiles

    For VisualStudio 2008, change the \8.0\ to \9.0\

    Note, however, that the GUID in the middle refers to the type of project (VB Console, C# Web, etc) it is. You may have to poke around to find the right one for you.