In a typical .Net development environment, you will have many projects. These may be class libraries, console apps, windows apps, web programes, etc... A natural question arises, which is how does one organize all these projects?
The most obvious answer, is that you add all the projects to one giant solution. Why? This has several advantages:
This obvious answer has one obvious drawback - performance. If you have a single solution with many projects, that solution may become unwieldy. Forcing developers to open up that single project may take a very long time, and eat a lot of memory. Developers will also have to checkout all of the source for the entire solution, even if they are only working on a small portion of the source. Plus, the overhead associated with seeing every project in the solution can be very confusing. Because of this, the single solution is not the correct way to manage things when the number of projects gets large.
Instead of a single solution, there should be many different solutions, that are broken down in some logical way (perhaps a solution for all libraries, or libraries of a certain nature for example), and there should only be a few projects in these solutions. Thus, developers will only have to open up solutions with a small number of projects in them, thereby avoiding the problems above. NOTE: It is always far more desirable to use project references. Therefore, these finer grain sub solutions must include the transitive closure of (non-GAC) projects they reference.
However, for automated builds, you will still want an all-encompassing solution as
mentioned above. That solution will encapsulate all of the build dependency infomation for
the automated build, and make the automated build script very simple. In fact, suppose that
the uber-solution is called omega.sln, then your autobuild script (for debug) can be as simple as:
devenv /build Debug /out build_errors.log "Omega.sln"
This structure is the preferred way of managing solutions with many projects. However, you can try a system where every project has its own solution. This disadvatage of this is that you cannot have dependencies or references across soutions - therefore you must manage these dependencies and references manually, which can be tedious.
The following table summarizes these different structures
| Technique | Advantages | Disadvantages |
| Single Master Solution |
|
|
| Single Solution for every project |
|
|
| Master solution and other finer grain solutions |
|
|