Cannot "Open from Source Control" for a moved fold

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Cannot "Open from Source Control" for a moved fold

Post by BBM » Thu Mar 08, 2007 3:30 pm

Hi,

I recently used the "move folder" option (on the Vault Client File menu) to re-organize my Repository "tree". I moved a folder (that was really the top level folder for a VS solution) from three levels deep in the repository tree to the level just below the root (how it got in the wrong place is a long tale that I'll save you from unless you think it significant).

When I try to "Open from Source Control" for this Solution on a new machine, I get a VS dialog saying that...

One or more projects in the solution could not be loaded for the following reasons:

The project file or web has been moved, renamed or is not on your computer.

As my "working folder" for the project I'm selecting a folder at C:\Dev\Name (where Name is the name of my solution).

What I get in VS on the target computer is my Solution with all the projects under it marked "unavailable".

When I look at the directory tree that was created on the target machine there are blank folders two levels deep before you get to the folder that contains the solution file. That is, VS is trying to install the solution in the same relative place on the target machine that the solution occupied before I moved it. The directory structure on the target computer looks like this...

C:\Dev\Name\Name\Name
(Note that the repository tree looked like $\Name\Name\Name BEFORE I moved the solution folder in the Repository to $\Name)

When I view the files that are in the project folders in the repository, they are all there and look fine.

This is a "completed" project, so worse comes to worst, I can delete the branch from the Repository and add it back in the right place from one of the other development machines. But I was hoping to save all my version history so I don't want to do this unless I have to.

Any suggestions?

Thanks.

BBM

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Mar 08, 2007 3:33 pm

You can go ahead and perform the fresh open from source control, but check the location that is listed. It probably just has the original, so you will have to change that to where you want it on disk and delete the old one on disk.

Then you will have to remove the grayed out projects and add each one in again from source control.

BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Post by BBM » Thu Mar 08, 2007 3:50 pm

Hi Beth,

I'm telling VS to install the Solution to C:\Dev\Name

It's installing to C:\Dev\Name\Name\Name

Why does VS think the solution is still in the old Repository location (before I moved it). Can I fix this?

BBM

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Thu Mar 08, 2007 6:06 pm

You will be able to remove one of those folders by opening the solution to C:\Dev.

For the rest, it will depend on how it is laid out in Vault and how it got there.
Also, when you say "install", do you mean you are performing an open from source control? If so, how was the project initially placed there? Was it created in Visual Studio and then someone performed an add to source control? What does the structure in Vault look like?

Basically, that structure you are describing is the default way that Visual Studio will lay out a project.

If you want, some screenshots might help. You can either post them here or send them to support at sourcegear.com (attn: Beth). If you do that, can you include a link to this post?

BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Post by BBM » Fri Mar 16, 2007 7:55 am

Hi Beth,

I just didn't have any more time to mess with this, so I renamed the old branch (the one that I moved),and re-added the Solution from one of the development machines.

It's working fine, but I "Lost" all my old versions. They're still in Vault, but if I ever need to get to them I'll have to open the old branch. Not a big deal, but pretty tacky.

I don't think that Move is working correctly, or I don't know what move is supposed to do. Once I "moved" the Vault folder to one level below the root, when I open it to a new location on a dev machine the structure created on the dev machine should reflect the new structure in Vault.

BBM

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Fri Mar 16, 2007 8:49 am

You said the move was performed in Vault. That would need to be done in Visual Studio. The structure needs to be set through Visual Studio.

BBM
Posts: 21
Joined: Sat Jul 29, 2006 3:47 pm
Location: Roswell GA

Post by BBM » Fri Mar 16, 2007 9:22 am

If I understand your response, moving folders in Vault has no impact on what structure gets set up on a new client when that user "opens" the Solution in Vault?

I guess I don't know how to completely control the structure from VS. I have control over what happens below the Solution level, but I have no control over folders that somethow get added ABOVE the solution.

BTW I'm not upset over this... just confused.

Thanks.

BBM

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Fri Mar 16, 2007 12:29 pm

You are correct. Visual Studio will track where it's files are via the .sln and .proj files and it is what will make the changes in those files. Also, when opening from source control, watch the dialog boxes for the paths on disk and the other Visual Studio options.

You may find our articles on IDE integration in our KB article section helpful for some general ideas: http://support.sourcegear.com/viewtopic.php?t=792.

If you wish, you can always send me a note at support at sourcegear.com if it still doesn't make sense and we can discuss more details.

Locked