VSS2005 – staying in line

Working with Visual SourceSafe always feels to me like walking on eggshells. One wrong move and you get that sickening crunching feeling and things seem to collapse.

My current project’s integrator decided to keep things neat. There’s a central solution containing all the projects, sitting under a central project in VSS. Dozens of projects, divided with Solution folders, all neat and ready for integration builds.
Naturally, most of us don’t really need all those projects open in our solutions when we work. They slow down work and are generally a headache, so we decided that everyone can create his own customized solutions and work against them.
For some reason, the decision was made to create a project folder under VSS for each team member, and have each team-member keep his own solutions there so as to not mess up the main project folder with random SLNs. It goes something like this:

$
  /
  / MainSolution
  / MainSolution / FirstProject
  / MainSolution / SecondProject
  / Avner

Where my SLN file now sits in $/Avner but references projects in $/MainSolution/FirstProject.

Anyone who’s worked with VSS might already be wincing in anticipation.
Visual Studio doesn’t really like to have project references not sitting underneath the current solution’s VSS root. If I add a new project under my solution and then check it in, it will automatically check that project in under my solution folder ($/Avner/ThirdProject). I have to remember to manually go to File -> Source Control -> Add to Source Control and answer ‘No’ when it asks me whether to add it under the solution folder.

Assuming I made a mistake, I can either spend 20 minutes struggling with moving it around and updating the bindings, or go the easy way: Erase the projects from VSS, remove them from the solution, then re-add them, permanently remove all SCC bindings and re-add them to the proper place. Ugh.

Since no-one enjoys that, I’ll try to list some recommendations:

1) When working with multiple solutions, it’s best to have them all reside in the same root solution project.
2) If you must put them in alternate folders, it’s best to create any new projects from the master solution to ensure they are created in the right place, then add them to the sub-solution using File->Add Existing Project -> From SourceSafe (LAN).
3) If you created them directly from the subsolution, make sure you don’t check them in immediately, but manually add them to the right place from File -> Source Control -> Add Project To Source Control.
4) If you did, don’t try to fix it. Just erase from VSS and from the solution and re-do from start.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.