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.
The release isolation TFS branching strategy introduces releases branches from the main. This strategy helps teams manage concurrent releases. Instead of releases just being a copy of the main branch, teams create a new branch to support each release. These can be maintained over a longer period of time.
You should use Git for version control in your projects unless you have a specific need for centralized version control features in TFVC. In other words, if you have a very specific reason why you need to continue using TFVC, Microsoft would rather you didn't.
In light of a picture representing your source control directory, I'll make the following assumption:
$/TeamProject /Framework /Console /Web /etc.
What you need to do first is create a Folder called Main
in $/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 Main
to a branch, you can do this by right clicking on the Main
folder and choose "Convert to Branch". TFS will now allow you to branch $/TeamProject/Main
to $/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 into Main
.
Remember to keep performing Forward Integration merges (merge down) from Main
to 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 Main
everything will be updated.
Your primary question as I understand it is "What is the best branching structure to branch my applications that depend on Framework?" If you always build and version/release them together then it is simpler and less expensive to branch them all together as DaveShaw descibes; however, if each of them is developed by different teams, have different release schedules, have different versions, etc... than you will want to create a MAIN branch under each of them. In this case, it should also be clear who owns changes to Framework. It is usually a good idea to control check-in access to only those who need it for shared projects like Framework.
If the latter case is true, then I think your current graphic handles it nicely, but I would make one change; Keep your Releases at the same level in the hierarchy as the MAIN branch so that the relative path remains the same for making references; this will simplify your workspace mappings:
$/TeamProject
/Framework
/Dev
/Main
/Release1
/Release2
/Release3
...
/WebApp
/Dev
/Main
/Release
/Release1
/Release2
/Release3
...
/WCFApp
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With