1

I have a large solution containing many projects. Due to the size and number of projects the build times are starting to become unmanageable.

I am interested in learning about any techniques people have used to break the solution down and how they've managed DLLs and project references.

Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
Mark 909
  • 1,825
  • 1
  • 18
  • 27
  • 1
    possible duplicate of [Best practices for large solutions in Visual Studio (2008)](http://stackoverflow.com/questions/690033/best-practices-for-large-solutions-in-visual-studio-2008) – Paul Sasik Dec 08 '10 at 17:44
  • Can you give us some metrics? How many projects in the solution? How many C# lines of code, roughly? To you build Release & Debug (and others configurations maybe)? – Simon Mourier Dec 08 '10 at 17:44
  • Good question but it's been asked and answered on this site a number of times already. Please see the dupe comment. – Paul Sasik Dec 08 '10 at 17:45

3 Answers3

1

Scott Hanselman has blogged on this a number of times.

Bottom line: 30-40 projects seems to be a reasonable upper limit. Anything more starts to get painful.

Ask yourself, "Do I really need all these projects building and in the solution?"

No? Then consider multiple solutions (e.g. client.sln, server.sln, plugins.sln, etc.)

Yes? Then consider consolidating projects into fewer projects. For example, combine Client.Presenters, Client.Views, and Client.Models into a single Client project. See Benefits of larger but fewer assemblies.

Judah Gabriel Himango
  • 58,906
  • 38
  • 158
  • 212
0

Best to follow Microsoft's recommendations:

Structuring Solutions and Projects

Dirk Vollmar
  • 172,527
  • 53
  • 255
  • 316
0

You can break your projects into different solutions and point their Build Output Path (Project Properties -> Build -> Output Path) to one common folder. Add the references between various projects from this common folder. This way there is no need to copy DLLs to various bin folders.

However the downside is that you have to remember the Build Sequence yourself.

Mayank
  • 1,621
  • 2
  • 14
  • 30
  • You can still use project references with this technique, and get Visual Studio to manage the build sequence. Add project references as normal, but set Copy Local=False. – Tim Robinson Dec 08 '10 at 18:01