c:\projects (all solution files live here)
c:\projects\sharedlib1
c:\projects\sharedlib2
...
c:\projects\websites\site1
c:\projects\websites\site2
etc.
with a similar VSS structure:
$/ (all solutions here)
$/sharedlib1
$/sharedlib2
...
Here's what I do when creating a new solution and project to make this work:
- Create a blank solution
File->New Project
Other Project Types/Visual Studio Solutions/Blank Solution
Don't check "Add to Source Control"
Location: c:\projects
Name: whatever (application name) - File System Surgery
File->Save As...
c:\projects\whatever.sln
Delete the subdirectory under projects (should be c:\projects\whatever\) - Add solution to VSS
Right click on sln, Add to Source Control
Leave name alone (will be whatever.root)
Location $/ - VSS Surgery
Start the VSS Client
Drag and drop Whatever.sln and Whatever.vssscc from c:\projects into $\ in VSS
In Visual Studio, go to File->Source Control->Change Source Control
There should be line line listed that says "Solution: Whatever.sln"
Click the elipsis ("...") in the Server Binding column
Pick $/
Hit Ok twice
In VSS, right click on $/whatever.root and pick delete (check the box to destroy permanently)
Close VSS
When adding new projects, always choose "C:\projects" for Location
When adding new websites, always choose "C:\projects\websites" for Location
and they will automatically be added to the right place in VSS
And that's it. Basically I change the binding root of the solution from the automatically created "whatever.root" folder to its parent, allowing multiple solutions to live in the same directory and in effect share the same binding root.
No comments:
Post a Comment