Hard-coded paths in .sln files cause problems when branching

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

Moderator: SourceGear

Post Reply
Stephen Turner
Posts: 2
Joined: Thu Jan 17, 2008 10:50 am

Hard-coded paths in .sln files cause problems when branching

Post by Stephen Turner » Thu Jan 17, 2008 10:58 am

Apologies if this is a FAQ, but I can't find the answer. Our .sln files have hard-coded source control paths in, for example

SccProjectName0 = \u0022$/deverse/ClickTracks\u0022,\u0020BYGAAAAA

When we branch, it's therefore still pointing to the trunk not the new branch. We used to have a similar problem with .vcproj and .csproj files which we solved using the SAK mechanism I read about on this forum, but that doesn't seem to work for .sln files.

http://support.sourcegear.com/viewtopic.php?t=194 seems to refer to the same problem but (i) it's very old, and (ii) it also says it only applies to web projects. Anyway, the solution isn't really appropriate for us because we have several (closely related) solutions on each branch, and I can't expect whoever's branching to open up several solutions and rebind them all.

At the moment we're reduced to editing all the .sln files after every branch to fix up the paths, which is a shame because branching ought to be an entirely painless -- and brainless -- operation. Surely there must be a better way.

Thanks.
--
Stephen Turner

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

Post by Beth » Thu Jan 17, 2008 2:38 pm

Can you tell me which version of Vault you are using, the version of VS, and which client you have set in VS under Tools - Options - Source control?

Stephen Turner
Posts: 2
Joined: Thu Jan 17, 2008 10:50 am

Post by Stephen Turner » Fri Jan 18, 2008 5:16 am

Sorry, I should have included that the first time. Vault is 3.5.2.5087; Visual Studio is 2005 with Vault client as source control provider.
--
Stephen Turner

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

Post by Beth » Fri Jan 18, 2008 9:11 am

When one branches, the binding information isn't changed because that takes VS being involved to change that. After branching, one has to unbind and rebind their solution.

Also, it's also not automatically assumed that one wants to switch over to working on the branch after a branch. We have some customers that are doing work in the trunk and the branch simultaneously, so some will want to be bound to the branch and some will want to be bound to the trunk.

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

Post by Beth » Fri Jan 18, 2008 9:42 am

What you can also do is just perform a fresh 'Open From Source Control' on the branch.

Post Reply