VS 2008 Project: Group/nest source code files

By admin - Last updated: Thursday, November 26, 2009 - Save & Share - Leave a Comment

Like windows form project, the design code and source code are grouped together for the ease of code management. You can group any related files in to one expendable tree view.

Before grouping
pbefore

After grouping
pafter

That’s pretty handy aye! Unfortunately, there is no UI to do this. The only way I’ve found is to modify the source of the .csproj file.

Use notepad or notepad++ to open myproject.csproj file and find the equivalent section like below
before

and change it to
after

Basically, add DependentUpon element with the value of parent file name. Save the the changes and reload the project in visual studio. That’s all done, you should see the nested files.




Posted in Random • • Top Of Page

Write a comment


Captcha: seven + = 16