Friday, 31 December 2010

Team Foundation Server 2010 (4)

Here's a guide on how to create a two - branch TFS2010 solution. It's as much a reminder for me as it is information for anyone else who might find this useful.

1. Create a new Team Project on the TFS server. Mine is called 'Baseline'
2. Create yourself a new folder on your C: drive called 'Visual Studio 2010'. Create another folder within this to store your project files, i.e. c:\Visual Studio 2010\Baseline.
3. Open the Solution Control Explorer (I'll refer to it from now on as TFS Explorer) for the Baseline Team Project. Use the Workspace drop down to create a new Workspace and call it 'Baseline'. Set the TFS working folder to the top level folder of the TFS project (i.e. Baseline), and the local folder to whatever you created in 2.
4. Create two new folders under the Baseline top level in TFS, call them Dev and Release.
5. Create a new VS2010 BLANK solution. Call it Baseline and place it into the Dev folder. If this has worked proerly you should now be able to see c:\visual studio 2010\baseline\dev\baseline in windows explorer, and see the .sln file and the .vscc file in this folder.
6. Add a new web project to the blank solution. Call it what you want (I've called mine BaselineWeb) and make sure it gets created inside the folder structure in 5. So you should have c:\visual stuido 2010\baseline\dev\baseline\baselineweb\*.* where *.* is all the .aspx, web.config files etc. for the website.
7. Next you need to check all this stuff into the TFS server.
8. Right click on the Dev folder in TFS explorer and select 'Convert to Branch'. The icon for the Dev folder in TFS explorer should have changed from the standard yellow folder to a white branch icon.
9. You now need to Branch the Release folder. Right click on the newly branched Dev folder and select Branch. The target needs to be $Baseline/Release/Release (i.e. you're adding a new Release folder under the original one). Commit this to the server. The Release/Release folder should also have had its icon replaced with a Branch icon.
10. You should be good to go now. You can merge the content of the Dev folder into the Release folder and vice versa.

No comments: