Problems with "Open From Vault"

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
schweeneh
Posts: 5
Joined: Mon Feb 11, 2008 5:07 pm

Problems with "Open From Vault"

Post by schweeneh » Mon Feb 11, 2008 5:18 pm

I'm having basic issues just opening a solution from vault.

I'm using visual studio 2005 with sp1 and vault 4.0.6

First of all, when I try to add a solution to vault it gives me an error message telling me other users may have problems opening the solution from vault. I've looked all over the forums for help on what this might mean but haven't been able to find anything.

When I try to open the solution this is what happens.

The solution opens but with the wrong folder structure. I end up with a solution, that contains a project, that contains a folder, that contains the original solution I was trying to open, plus all my other folders and projects inside the solution.

Also, one of the projects in the solution is marked as missing, I solved that problem just by manually setting the working folder of the project.

I've used a different version of vault in the past and didn't have any of these problems. They way it's acting now I may as well be using VSS.

Any suggestions (or links to a good walkthrough) of how to initially set up a vault solution would be greatly appreciated.

I have followed the getting stated guide and I've also looked at the client manual, both of which have very minimal information on the topic.

Thanks for your time.

gmagana
Posts: 145
Joined: Wed Feb 18, 2004 10:51 am
Location: Santa Ana, CA, USA

Post by gmagana » Mon Feb 11, 2008 10:00 pm

That's exactly what the message about other users having problems with opening the solution: Your directories are set up different than how VS likes them. Please note this is all a VS limitation and not Vault's.

Basically, VS likes all the projects in a solution to be in a subdirectory of the solution file itself. You apparently have projects in directories that are not subdirectories of where the solution file is located.

There are many threads about this on the forums already, though I don't know if you have to get creative about searching for them.

I think VS2008 has less of a problem with these directory structures.

The way I dealt with them in VS2005 and before was to add the solution to Vault (and get the same warning you received). By this time VS has already screwed the directories up, though you cannot tell by looking at the physical directories in your computer because VS covered its tracks by setting working directories in your machine to make it appear everything's fine. If you look at the directory structure in the Vault client you might see screwed up directories already. If you see screwed up directory structures in Vault, fix them first (ie, move the files within the Vault client to the correct directory structure).

What I then did, was to open the solution and project files in Notepad and edit the directories back to what the should have been in the first place.

(Note that all of this is taking place with the VS solution closed)

Then, I removed the "custom" working directories set by VS. I like to right click on the root and assign that to the root working directory on the specific machine I am using and force all subdirectories to inherit working directory assignments, but that is really up to you. The real goal is to remove all the crap assignments that VS put in there to make it appear that your solution's directories do not have a problem.

Anyway, the most time consuming part of it is editing the files with notepad since the directories are specified in several places on the files and it is really easy to miss one.

Once you are done, the real test is to open the solution in a fresh machine and see if everything opens correctly, and everything is in its rightful directory.

It's a hassle, but at least there is hope, as it is possible to get it all working correctly without having to change your directory structure to fit VS' preferences.
gabriel magana-gonzalez

schweeneh
Posts: 5
Joined: Mon Feb 11, 2008 5:07 pm

Post by schweeneh » Tue Feb 12, 2008 9:35 am

Thank you for the thorough and quick explanation, I'm gonna give this a try, I'm sure it's the problem.

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Tue Feb 12, 2008 4:43 pm

Thanks for the good response, Gabriel.
gmagana wrote:Basically, VS likes all the projects in a solution to be in a subdirectory of the solution file itself.
I hope to eventually write a more thorough knowledge base article about bindings and relative disk paths, but this is the short version. If you want Open From Vault to work reliably, you can save yourself a lot of trouble by ensuring your solution is at the top of your source tree before adding it to Vault. We've done lots of work to make the new IDE client behave nicely in other scenarios, and it is possible, but this is always the choice with the fewest complications.

Starting in Vault 4.0.6 we warn you before you add a solution to Vault that's not laid out this way on disk.
Ian Olsen
SourceGear

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Mar 03, 2008 2:13 pm

There's more information about this issue in this knowledge base article.
Ian Olsen
SourceGear

Post Reply