I have a Solution called “Framework” which is a C# assembly for my business logic and data transactions.
I have 4 applications that use Framework, 1 website, 1 Console app and 3 other types of applications.
$/TeamProject
/Framework
/Dev
/Main
/Release
/WebApp
/Dev
/Main
/Release
/WCFApp
/Dev
/Main
/Release
I have all these in one Team Project with each assembly/application under its own folder.
I want to use the branching feature for each of the applications that share the Framework assembly but I don’t know what is the best way to branch the Application along with the Framework?
Any suggestions?
I know how Branching and merging works, but all the examples only demonstrate branching everything that is contained in 1 folder.
In light of a picture representing your source control directory, I’ll make the following assumption:
What you need to do first is create a Folder called
Mainin$/TeamProject(this will be your Main – aka trunk – branch) and move all of your top level folders into it.So then we have:
$/TeamProject /Main /Framework /Console /Web /etc.Now you need to convert
Mainto a branch, you can do this by right clicking on theMainfolder and choose “Convert to Branch”. TFS will now allow you to branch$/TeamProject/Mainto$/TeamProject/ConsoleV2(for example) and work on features for V2 of the Console. You can modify the Console Application and the Framework if required in this branch. When this work is complete you can Reverse Integrate (merge up) the changes back intoMain.Remember to keep performing Forward Integration merges (merge down) from
Mainto your feature branch and resolving any conflicts to keep the code bases synchronised.By taking this approach you can modify any part of any of your products in a single atomic check in, say for example, you change an API on your Framework adding a new mandatory parameter to a method, you can change it in all your apps at the same time, and when you RI merge into
Maineverything will be updated.