2

at the moment I‘m very frustrated while developing at work. We‘re working in a visual studio 2019 solution file with 290 projects in it. Our software is written in C# using .NET code.

I‘m getting even more frustrated every time when I change a branch of the git repository, because the visual studio then starts a whole reload of the solution which takes up to 5 or 10 minutes.

Do you know if there is a limit for the amount of projects in a visual studio solution? Or did you work within solution with a higher amount than 300 projects?

ikarus
  • 21
  • 2
  • 4
    50's my limit. I think the universe is telling you you need to farm some of that stuff out to being nuget packages on your own private server (surprisingly easy). You can't possibly need to debug step into any one of 290 projects on a whim. – Caius Jard Feb 04 '21 at 20:15

1 Answers1

0

While there is no enforced limit (in theory you can have thousands of projects in a solution file and visual studio will try to load them) there are some, as you can see here: Recommended number of projects in Visual Studio Solution

  1. Machine limits. After a certain number, non powerful machines take to much to load or even crash.
  2. Older vs version have been reported to crash after a certain number (even lower than yours)
  3. Manageability is also a concern. Too many projects sometimes mean that there should be a better separation of concerns. Having them all in one solution sometimes brings unneeded coupling between unrelated codebases.

If number 3 is not the case, I'd advise you to create multiple solutions, each a subset of the projects per domain area.

If it is, try to refactor and decouple. Each decoupled dll should be moved outside the solution, packaged into a nuget and consumed independently.

Athanasios Kataras
  • 25,191
  • 4
  • 32
  • 61