Solution with Project already under source control

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

Moderator: SourceGear

Post Reply
Nihimon
Posts: 68
Joined: Wed Sep 12, 2007 1:23 pm

Solution with Project already under source control

Post by Nihimon » Thu Sep 13, 2007 10:33 am

I'm unable to add a solution to source control when one of the projects within the solution is already under source control.

My situation is, I have a library project that I've already added to Source Control by itself. I have a new Solution and I Add... Existing Project the library project. Now, I don't have an option to Add to Vault for the Solution. My only options are Get Latest, Offline, or Unbind.

What is the recommended way for me to do this, as this is something we do a lot.

Matt Knowles

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

Post by Beth » Thu Sep 13, 2007 10:51 am

The best way to deal with this is to perform an add to source control without the projects present that are already in. Then, you can add them to the solution through an Add Existing Item.

Often, I even recommend people start with a blank solution, add it to source control, and then add in the things they need to it.

I'm assuming you don't need a second copy of that project that already exists in source control, right?

Nihimon
Posts: 68
Joined: Wed Sep 12, 2007 1:23 pm

Post by Nihimon » Thu Sep 13, 2007 10:53 am

That's correct, we don't want a second copy, just a link to the existing copy.

So, your preferred process is to add the Solution to source control first, even before adding any projects, and certainly before adding any external, pre-existing projects.

Thanks, that makes sense.

Matt

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

Post by Beth » Thu Sep 13, 2007 3:47 pm

It's a case by case scenario, but I have definitely always found best results of not adding in the existing stuff until at least the solution and other items are in source control. When one makes a separate blank solution and then adds things to it, I think a person gets more control over the layout of the entire solution. For example, when you make a website in VS 2005, the .sln file gets put in a VS location that is completely unrelated to where you have the website and it can cause a headache later when you are making something with multiple projects or tiers.

Post Reply