Solution/Project heirarchy guidance
Moderator: SourceGear
Solution/Project heirarchy guidance
I've spent the last couple of days trying to get our imported (VSS) source database to work reliably, but I just can't seem to get it solid. I've repositioned projects and solutions, unbound and rebound them, and just when I think everything is kosher I'll get an invalid binding that can't be fixed without tearing it all down again.
I've decided to scrap the history we had in VSS and just upload our current source tree to a fresh repository, but I'd like some input on how Vault handles some scenerios before I put more time into it.
1. Is it valid to have more than one solution bound to a Vault directory.
I have one solution that contains our entire product line (about 30 projects) and several other solutions that contain subsets of the whole list (easier for the developers). I understand that all the projects within a solution NEED to be in directories under the solution directory, so the only place to have these multi-project solution files is at the root.
2. Where should I put 'setup and deployment' projects?
Those thirty projects get packaged into 5 different installs. I've tried putting the setup projects at the same level as the project(s) they are created for and also in a separate directory off the root, but both options threw errors in VS about their locations (bind to 6 folders higher...etc.)
Fortunately, I really don't care about the version history we had to date as we're still short of a 1.0 release, but after that day comes, it will be important that I can build old versions
Thanks in advance for you input.
Scotch
I've decided to scrap the history we had in VSS and just upload our current source tree to a fresh repository, but I'd like some input on how Vault handles some scenerios before I put more time into it.
1. Is it valid to have more than one solution bound to a Vault directory.
I have one solution that contains our entire product line (about 30 projects) and several other solutions that contain subsets of the whole list (easier for the developers). I understand that all the projects within a solution NEED to be in directories under the solution directory, so the only place to have these multi-project solution files is at the root.
2. Where should I put 'setup and deployment' projects?
Those thirty projects get packaged into 5 different installs. I've tried putting the setup projects at the same level as the project(s) they are created for and also in a separate directory off the root, but both options threw errors in VS about their locations (bind to 6 folders higher...etc.)
Fortunately, I really don't care about the version history we had to date as we're still short of a 1.0 release, but after that day comes, it will be important that I can build old versions
Thanks in advance for you input.
Scotch
As I posted above, I've removed all source integration from all my solutions and projects and now I'm trying to add them into Vault.
The first thing I did was clean out all the .obj and .bin directories and *scc files so the only files on my hard drive should be actual source files that I want to control. Then I manually edited all the solution and project files to get rid of the source integrations stuff.
I can now open up my solutions in VS and get no source control errors. When I use the Change Source Control dialog to bind my solution to the root folder, the status shows as valid but when I click OK, I get an "Unspecified Error" dialog and the change isn't saved.
Should I be adding the solution(s) in a different way? When I tied to use the "Add Solution to Source Control" command, I got other errors, but I will try that avenue again.
Scotch
The first thing I did was clean out all the .obj and .bin directories and *scc files so the only files on my hard drive should be actual source files that I want to control. Then I manually edited all the solution and project files to get rid of the source integrations stuff.
I can now open up my solutions in VS and get no source control errors. When I use the Change Source Control dialog to bind my solution to the root folder, the status shows as valid but when I click OK, I get an "Unspecified Error" dialog and the change isn't saved.
Should I be adding the solution(s) in a different way? When I tied to use the "Add Solution to Source Control" command, I got other errors, but I will try that avenue again.
Scotch
If you want to use IDE integration and don't care about previous history, I would definitely recommend trying to get the Add Solution to Source Control command to work. VS.Net knows which files it wants to keep in source control, and adds them where it wants them to be, so if you can get that work, that would be best.
If you can bring up your solution so that it thinks its not under source control at all, an Add To Source Control will hopefully work. You might want to start with a fresh repository too, in case your existing one has gotten messy with adds/deletes/binds/unbinds, etc.
If you can bring up your solution so that it thinks its not under source control at all, an Add To Source Control will hopefully work. You might want to start with a fresh repository too, in case your existing one has gotten messy with adds/deletes/binds/unbinds, etc.
If I choose "Add solution to source control", I get a dialog where you can choose the vault folder. At the bottom of this dialog there is a textbox that shows the working forlder. For some reason, it shows "C:\". Since my solution is actually at "c:\data\source vault\onelink media\" the whole thing goes haywire. If I look at the Vault client, the whole directory structure, from the root, gets created but some projects show up in other folders.
How can I fix this?
How can I fix this?
Since "Add solution to source control" isn't working for me, I tried to add each of the projects, one at a time. This appears to work OK at first, but then if I go into the "Change Source Control" dialog, the solution and 2 projects show invalid bindings. This is odd, since there were no errors thrown while I was adding the projects. If I try to unbind and rebind them, I'm back to the state I started in when I began this thread. I'd really appreciate if someone could help me with the following questions:
Is it OK to bind a solution to the root of the repository?
Is it OK to have folders beneath the solution to sub-group your projects?
Solution
Group A
Project 1
Project 2
Group B
Project 3
Project 4
The groups are neither projects nor solutions, they are just folders on the hard drive to keep related components together.
Where should "Setup and Deployment" projects be placed? I always seem to get errors when adding these projects to source control. Even if I do get them to add, their binding are later invalid.
Is it valid to have multiple solutions in the same folder, and therefore, bound to the same location in Vault?
I've got to be doing something pretty heinously wrong, but I just can't figure it out. SourceSafe worked flawlessly (well, as flawless as SS can) with this configuration of solutions and projects. Why is this going so badly in Vault?
Is it OK to bind a solution to the root of the repository?
Is it OK to have folders beneath the solution to sub-group your projects?
Solution
Group A
Project 1
Project 2
Group B
Project 3
Project 4
The groups are neither projects nor solutions, they are just folders on the hard drive to keep related components together.
Where should "Setup and Deployment" projects be placed? I always seem to get errors when adding these projects to source control. Even if I do get them to add, their binding are later invalid.
Is it valid to have multiple solutions in the same folder, and therefore, bound to the same location in Vault?
I've got to be doing something pretty heinously wrong, but I just can't figure it out. SourceSafe worked flawlessly (well, as flawless as SS can) with this configuration of solutions and projects. Why is this going so badly in Vault?
One more question:
I have a solution that contains several projects. All of the projects have been added to Vault (lock icon and all) but the solution is presently unbound. If I go to the "Change Source Control" dialog and bind the solution to $, an error dialog pops up "Unspecified Error". What is this and how can I get past it?
I have a solution that contains several projects. All of the projects have been added to Vault (lock icon and all) but the solution is presently unbound. If I go to the "Change Source Control" dialog and bind the solution to $, an error dialog pops up "Unspecified Error". What is this and how can I get past it?
Let's go back to this, since it will be easier to add a solution to source control from scratch than to try to bind and rebind to get it right:
This is undoubtably a big part of the problems you are seeing, if the working folder in Vault does not match the actual location of the project files.
The textbox there shows the location of the project on disk. Can you double check where the solution file was invoked from? Do you have a solution or project at c:\?Scotch wrote:If I choose "Add solution to source control", I get a dialog where you can choose the vault folder. At the bottom of this dialog there is a textbox that shows the working forlder. For some reason, it shows "C:". Since my solution is actually at "c:\data\source vault\onelink media" the whole thing goes haywire. If I look at the Vault client, the whole directory structure, from the root, gets created but some projects show up in other folders.
This is undoubtably a big part of the problems you are seeing, if the working folder in Vault does not match the actual location of the project files.
That's correct, the dialog shows "c:\", and nope, I never had a project or solution at the root. In fact, I've just done a clean install of both the client and server, and this is the first thing I've done:
Open the "Full" solution which has 27 projects in it including WinForms, Web, Component, and Setup projects. Select "Add solution to source control" (the empty root folder is showing in the tree view) and at the bottom of the dialog, the Working Folder shows as "C:\". The solution I opened is located at "C:\data\soure vault\OneLink Media Systems"
Open the "Full" solution which has 27 projects in it including WinForms, Web, Component, and Setup projects. Select "Add solution to source control" (the empty root folder is showing in the tree view) and at the bottom of the dialog, the Working Folder shows as "C:\". The solution I opened is located at "C:\data\soure vault\OneLink Media Systems"
One of the problems here has been tracked down to a stray file in a project that was somewhere in c:\windows, causing the working folder as reported by Visual Studio to be incorrect, and all sorts of bad things to happen.
See http://support.sourcegear.com/viewtopic.php?t=552 for a little more info.
See http://support.sourcegear.com/viewtopic.php?t=552 for a little more info.
First, I'd like to thank Dan for all the fantastic help he's given. In kind, I'd like to offer up some of the things I discovered to maybe help someone else though this process.
1. Is it valid to have more than one solution bound to a Vault directory? Can a solution be bound to the root?
Yes, I have a FULL solution as well as a couple of PARTIAL solutions in the root folder and they are working fine. When you go to "Add the Solution to Source Control", just clear out the project name and make sure the root ($) is selected in the tree view.
2. Where should I put 'setup and deployment' projects?
Anywhere. It doesn't matter as long as they are in a directory under the solution, this applies to ALL projects in the solution though. In my case, I left the setup project folder next to its most relevant project folder.
3. Is it OK to have folders beneath the solution to sub-group your projects?
Yes. As long as all project folders are beneath the location where the solution file is. For example, the following works for me:
..\Solution <-- solution stored and bound here
..\Solution\GroupA\Project1
..\Solution\GroupA\Project2
..\Solution\GroupB\Project3
..\Solution\GroupB\Project4
AFAIK, this works in all cases. I've got some shared libraries in other folders and they bind OK as long as they are under the solution.
4. If you ever try to add a project/solution to source and the Working Directory shows as "c:/", then you probably have a file in your project that is not under the solution directory. In my case, I had a setup project that installed a web site using the InstallUtil.exe file from the framework. When I created the setup project, I included this file from c:\windows\microsoft.net\...., which caused many of my binding problems. To fix it, I just copied the file into the project folder.
5. Web project names cannot be longer than 24 characters.
I've only verified this with a web project so far, but it might apply to others. My project name was "Media Control Web Service", which is 25 characters long, and I was getting lots of "Unspecified Error" dialogs whenever I'd do something with source control. When I removed the last space ("Media Control WebService") on a lark, the problems went away. I'd like to see this verified by SG though.
6. Use the "Add project/solution to source control" menu items. This is the easiest way to get all the binding information set in the project files and have the SCC files created.
7. Use the "Open from Source Control" menu items to get your solution the first time. If you have web projects, you should do this before doing a Get Latest to retrieve all the files. Vault will put the files in the appropriate folders (NOT under inetpub for web projects).
I hope this helps. Good luck.
Scotch
1. Is it valid to have more than one solution bound to a Vault directory? Can a solution be bound to the root?
Yes, I have a FULL solution as well as a couple of PARTIAL solutions in the root folder and they are working fine. When you go to "Add the Solution to Source Control", just clear out the project name and make sure the root ($) is selected in the tree view.
2. Where should I put 'setup and deployment' projects?
Anywhere. It doesn't matter as long as they are in a directory under the solution, this applies to ALL projects in the solution though. In my case, I left the setup project folder next to its most relevant project folder.
3. Is it OK to have folders beneath the solution to sub-group your projects?
Yes. As long as all project folders are beneath the location where the solution file is. For example, the following works for me:
..\Solution <-- solution stored and bound here
..\Solution\GroupA\Project1
..\Solution\GroupA\Project2
..\Solution\GroupB\Project3
..\Solution\GroupB\Project4
AFAIK, this works in all cases. I've got some shared libraries in other folders and they bind OK as long as they are under the solution.
4. If you ever try to add a project/solution to source and the Working Directory shows as "c:/", then you probably have a file in your project that is not under the solution directory. In my case, I had a setup project that installed a web site using the InstallUtil.exe file from the framework. When I created the setup project, I included this file from c:\windows\microsoft.net\...., which caused many of my binding problems. To fix it, I just copied the file into the project folder.
5. Web project names cannot be longer than 24 characters.
I've only verified this with a web project so far, but it might apply to others. My project name was "Media Control Web Service", which is 25 characters long, and I was getting lots of "Unspecified Error" dialogs whenever I'd do something with source control. When I removed the last space ("Media Control WebService") on a lark, the problems went away. I'd like to see this verified by SG though.
6. Use the "Add project/solution to source control" menu items. This is the easiest way to get all the binding information set in the project files and have the SCC files created.
7. Use the "Open from Source Control" menu items to get your solution the first time. If you have web projects, you should do this before doing a Get Latest to retrieve all the files. Vault will put the files in the appropriate folders (NOT under inetpub for web projects).
I hope this helps. Good luck.
Scotch