Hi,
I need to check out an old branch of my ASP.NET web project to make some changes. I am using Visual Studio 2008 with the Enhanced Client. I am more or less familiar with how branching works, but I am not sure in which working folder I am supposed to check out the old branch. I imagine it is not in my main development folder where I check out my trunk files. Am I supposed to create separate folders for the solution file and the web content? I have tried that, but apparently Vault mixes up the branched files with the trunk.
I seem to recall reading some guidelines about this ages ago. Maybe it was related to the fact that the folder layout I am using is apparently not "Vault friendly", despite it was created by Vault when I added the solution.
Any ideas? Many thanks in advance.
Checking out branch
Moderator: SourceGear
Checking out branch
Regards,
Cesar.
Cesar.
Re: Checking out branch
After you create the branch in Vault, you need to perform a fresh Open from Vault from inside Visual Studio. You will receive errors because there are hard-coded bindings from the trunk, but you will click Ok through the errors and choose the option to Permanently Remove Bindings if it's offered. During the open you need to choose a different location on disk than where the trunk files are. After that, you will need to go to File - Vault Source Control - Change Bindings to either check the bindings or to rebind depending on the status shown.
If using the Open from Vault doesn't work for you because of your layout, then you can instead do the following:
If using the Open from Vault doesn't work for you because of your layout, then you can instead do the following:
- 1) Set a working folder in the Vault GUI client for the branch. It cannot be set to the same location as the trunk.
2) Perform a Get on the branch.
3) Open the project in VS. Click Ok through the errors and choose the option to Permanently Remove Bindings if it's offered.
4) Go to File - Vault Source Control - Change Vault Bindings.
5) Select all lines in the window that opens and click Unbind.
6) Click OK and Save All.
7) Go to File - Vault Source Control - Change Vault Bindings.
8_) Select one line that is not the .sln file and click Bind.
9) When the binding window opens, select the folder that element resides in and click OK.
10) Check that the status for that line is Valid.
11) Repeat on each line, but do the line for the .sln last. When all are Valid, click OK.
12) Check in the changes to the .sln and project files.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Checking out branch
Many thanks for your reply, Beth. I have managed to solve the problem, but I had to perform a couple of extra steps in addition to what you explained.
Since my projects are web projects, and the source files are stored by Visual Studio under a different root than the solution file, I chose to follow the numbered list of steps in your post. I managed to complete them, but the source files showing up in Visual Studio were still the ones in the trunk rather than the branch. This may be due to the fact that the solution file stores paths to the folder where these files reside on disk. What's more, when I did the rebinding that you explain in steps 4-11, I could observe that the Local Path column in the Change Vault Bindings dialog box pointed to the working folder of my trunk files, even after following the steps that you specified. I quadruple checked. I even created a fresh Vault repository and created a new project just for testing purposes.
I solved this by manually removing the project from the solution within Visual Studio, and manually adding the project in the correct working folder. From that point on, everything worked flawlessly. Maybe this is something that you would like to document for the sake of future questions.
By the way, when I did that, I made Vault unhappily pop a dialog asking:
Thank you.
Since my projects are web projects, and the source files are stored by Visual Studio under a different root than the solution file, I chose to follow the numbered list of steps in your post. I managed to complete them, but the source files showing up in Visual Studio were still the ones in the trunk rather than the branch. This may be due to the fact that the solution file stores paths to the folder where these files reside on disk. What's more, when I did the rebinding that you explain in steps 4-11, I could observe that the Local Path column in the Change Vault Bindings dialog box pointed to the working folder of my trunk files, even after following the steps that you specified. I quadruple checked. I even created a fresh Vault repository and created a new project just for testing purposes.
I solved this by manually removing the project from the solution within Visual Studio, and manually adding the project in the correct working folder. From that point on, everything worked flawlessly. Maybe this is something that you would like to document for the sake of future questions.
By the way, when I did that, I made Vault unhappily pop a dialog asking:
It offered to use the bindings anyway or to change them. I chose use them anyway, but I am not sure that I fully understand the impact of this. Is there any knowledge base or other resources that explain this?One or more projects have a different binding than the solution. Projects with different bindings than the solution may not load for other users when using Open From Vault to open the solution.
Thank you.
Regards,
Cesar.
Cesar.
Re: Checking out branch
Depending on your layout, it's possible for the projects to bind to a different area than the solution. This exact error isn't explained in our FAQ, but it might still help you understand it better: http://support.sourcegear.com/viewtopic.php?t=9672.One or more projects have a different binding than the solution. Projects with different bindings than the solution may not load for other users when using Open From Vault to open the solution.
It's not a problem though. Mostly, you just need to be aware of it.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Checking out branch
Thanks for pointing me to that FAQ. It does contain an explanation of why the disk layout makes Vault behave in that particular way.
Regards,
Cesar.
Cesar.