Search code examples
c#visual-studioarchitectureprojects-and-solutionssolution

Why add a project to a solution rather than a folder?


I'm encountering a weird solution structure in my company—the different layers of the application are organized in folders (instead of in projects).

For instance, there are folders within the solution named "DAL", "BL", "WCFClient," etc. I've never seen that before, but can't quite put my finger on what troubles me about it.

Can anyone tell me if there are any cons (or possibly pros) for this folder-based organizational approach?


Solution

  • Here are few cons and pros for C# (.NET) projects:

    Pros:

    Cons:

    • Code is not modular. You cant reuse parts of it in other projects. I think this is one of biggest downsides. For instance if you want to use one class from assembly. You have to add reference to whole project.
    • One project can grow HUGE and cause multiple problems. Starting from name collisions (In VB.NET there are no namespaces automatically created for folders) into deep folder trees.
    • Searching from huge project is harder than from small one (depending how accurate the foldering is)