Source control being lost after re-opening solution.

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

Moderator: SourceGear

Post Reply
kamikaze
Posts: 4
Joined: Mon Jan 08, 2007 4:42 pm

Source control being lost after re-opening solution.

Post by kamikaze » Mon Jan 08, 2007 5:14 pm

I am using VS 2005 on Win XP SP2 with the Vault Client v3.1.9.3798.

I have a solution with several projects.

When I do an "Open from source control" everything gets downloaded and works beautifully.

However, if I close the IDE, and then re-open the solution (by just double-clicking the .sln file or doing File > Open Project/Solution... from VS) one (only one) of the projects seems to lose the source control binding.

It's odd because at first you can see the blue padlocks in the IDE, indicating that the files are under source control. However as soon as you look at the files in the Solution explorer, you can actually see the padlocks disappearing.

After that, all the source control options no longer show up on the context menus in the Solution explorer (right-click a file there is no Check Out for Edit, Get Latest Version, etc.).

If I try to check out that project (for example to add a new file) I get a message stating "None of the items in the selection are valid for this operation", even though it is showing the blue padlock in the IDE.

Now, I don't know if it makes any difference, but all the files on that project are inside other directories. So we have something like this:

Code: Select all

Solution
   ProjectA
      ...
   ProjectB <-- exhibits the problem
      Component\
          File1.cs
          File2.cs
          File3.cs
      BusinessEntities\
          File4.cs
          File5.cs
          ...
   ProjectC
          ...
Any ideas on what might be happening or how to resolve it?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Jan 08, 2007 5:43 pm

Is this happening only to one user, one machine?

Have you tried to unbind the project and rebind?
Linda Bauer
SourceGear
Technical Support Manager

kamikaze
Posts: 4
Joined: Mon Jan 08, 2007 4:42 pm

Post by kamikaze » Mon Jan 08, 2007 6:44 pm

lbauer wrote:Is this happening only to one user, one machine?

Have you tried to unbind the project and rebind?
It's happening to all users of the solution on different machines.

I did a Source Control > Change Source Control... > Unbind, then did a Bind again to it's original location.

No change. I get the same behavior.

Any other ideas?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Jan 09, 2007 12:55 pm

Now, I don't know if it makes any difference, but all the files on that project are inside other directories
Actually, this could be part of the problem, especially if you're only seeing the problem with one solution. Visual Studio expects all items in a project to be under common root, with a certain structure. A discussion of this here:

http://support.sourcegear.com/viewtopic.php?t=6018

Let me know if this isn't relevant to your situation.
Linda Bauer
SourceGear
Technical Support Manager

kamikaze
Posts: 4
Joined: Mon Jan 08, 2007 4:42 pm

Post by kamikaze » Tue Jan 09, 2007 1:19 pm

lbauer wrote:Let me know if this isn't relevant to your situation.
Mmmh, I don't think this is our situation. All projects have their own folder under are under the same root for the solution. What I meant was that the code files were in subfolders (relative to the project directory).

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Jan 09, 2007 3:22 pm

There's probably something about the structure of the project that Visual Studio doesn't like -- possibly the fact that the code is in separate folders.

Would it be possible to get a copy of your project? If you're concerned about sending the actual code, you could just replace the code in your files with comments. But leave any binding info. Mostly we need the current structure.
Linda Bauer
SourceGear
Technical Support Manager

kamikaze
Posts: 4
Joined: Mon Jan 08, 2007 4:42 pm

Post by kamikaze » Tue Jan 09, 2007 3:40 pm

I got it working!

Turns out I was re-binding the project to the same location, and that location was wrong to begin with.

I had to do an Unbind through VS, then hit OK on that dialog box (I it was only after that that it applied the changes). I then opened up the Change Source Control box again to bind it to the correct location.

Thanks for all your help! :D

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Wed Jan 10, 2007 5:14 pm

That's good news. Glad Vault and VS are working for you now.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply