Recommended number of projects in Visual Studio Solution

I’ve worked on products on both extremes: one with ~100 projects in a single solution, and one with >20 solutions, of 4-5 projects each (Test, Business Layer, API, etc).

Each approach has its advantages and disadvantages.

A single solution is very useful when making changes – its easier to work with dependencies, and allows refactoring tools to work well. It does however, result in longer load times and longer build times.

Multiple solutions can help enforce separation of concerns, and keep build/load times low, and may be well suited to having multiple teams with narrower focus, and well defined service boundaries. They do however, have a large drawback when it comes to refactoring, since many references are file, not project references.

Maybe there’s room for a hybrid approach use smaller solutions for the most part, but create a single including all projects for times when larger scale changes are required. Of course, you then have to maintain two separate solutions…

Finally, the structure of your projects and dependencies will have some influence on how you organize your solutions.

And keep in mind, in the long run RAM is cheaper than programmer time…

Leave a Comment