views:

239

answers:

2

What's the best way to manage the physical layout of a Visual Studio project on disk? I'm getting to the point where I have several folders but I can't really continue categorizing the way I am now. For example, I have several custom controls, but sometimes those controls have to do with application settings, so do they go into the Controls folder or Application Settings folder? I have many full-fledged forms that reside in the main source folder so that it's getting a bit daunting looking for the right source file.

Are there any tips anyone can offer on how they organize their medium-sized projects into folder hierarchies so they don't go insane trying to locate something in the project?

+1  A: 

I typically organize my folders based on my namespaces. For example, classed in the namespace "Company.Project.DataAccess" would be stored in company/project/dataAccess directory.

I admit that this is still slightly painful to manage opening files. However, Resharper's "Go to type" feature has eliminated all of my searching in Solution Explorer.

nikmd23
Ah, so in my case I could simplify things by implementing a "User Interface\Forms, User Interface\Controls, User Interface\etc." type structure?
jasonh
Exactly! I also end up having directories for Extensions, and sometimes Interfaces and Enums.
nikmd23
A: 

This is the hierarchy I typically use in medium sized projects.

A solution file consisting of 3 projects:

  1. The ASP.NET Web application project
  2. A business logic project (housing the majority of my buslogic classes)
  3. A database project (for housing my create scripts, stored procedures, etc.)

I'll have a forth project if I'm using custom WebControls. Within the Web app project, I'll have the usual folders such as css, images, includes, scripts, etc, as well as a folder for user controls if I'm using them. I almost always store my app settings in the Web.config.

Barry Gallagher