2006-10-16
Lots of projects in a Visual Studio 2005 Solution
Well, we have a significant amount of projects (around 80) in our so called "official" solution. The is the solution we use on our TeamFoundation Server for the build process and under some circumstances on our local developer boxes.As this is mostly unbearable for normal development, I have developed the following trick - called "stripped down solution":
1. Get the whole source code for the solution.
2. Build the solution. I use "msbuild official.sln" from the commandline.
3. Create a new solution. I have an item in my Explorer/New menu forthat.
4. Open the new solution and add just those projects you plan to develop in. Usually this is the production project and the test project.
Why does this work?
When the solution has been built, all the references between projects in the solution are pointing to the assemblies in the build output of the referenced project. This is accomplished by step 2. When you remove a project from a solution all the references to that project are removed from the referencing projects. So we do it the other way around: We start with an empty solution and just add the things we want to change.You might get worried when you look at the list of references in the Solution Explorer: some of the references show a warning sign. You can ignore that almost all of the time. Your solution will work as expected.
Some additional remarks.
Why the mega-solution?
-> It binds together all the visual studio projects we want to build at once.
Are there situations where the stripped down solution does not work?
-> Yes! When you rename an identifier, automatic renaming applies only to the projects within the current solution. So for that you will need the mega-solution again.
-> Adding project references. You obviously will need the mega solution to do that.
Do you check in the stripped down solutions?
-> No! The stripped down solutions are tailored to the developer and the task at hand. The stripped down solution I am using today will have little relevance for some other developer next week.
Maybe this will work with unloading the projects as well, but I have not tried this yet.
Subscribe to:
Posts (Atom)