{"id":3893,"date":"2012-11-22T15:08:00","date_gmt":"2012-11-22T15:08:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2012\/11\/22\/quick-response-sample-visual-studio-extension-to-support-the-alm-rangers-branching-and-merging-guidance\/"},"modified":"2022-07-21T06:00:23","modified_gmt":"2022-07-21T14:00:23","slug":"quick-response-sample-visual-studio-extension-to-support-the-alm-rangers-branching-and-merging-guidance","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/quick-response-sample-visual-studio-extension-to-support-the-alm-rangers-branching-and-merging-guidance\/","title":{"rendered":"Quick Response Sample \u2013 Visual Studio Extension to support the ALM Rangers Branching and Merging guidance"},"content":{"rendered":"<p><a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2012\/08\/10\/toc-quick-response-solutions.aspx\">Quick Response samples<\/a> provide information directly from Visual Studio ALM Rangers working with the Microsoft Visual Studio Product Group and Microsoft Services, in response to feature gaps to supplement the product and knowledge base information.<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/1614.image_thumb_5153C1F6.png\" width=\"150\" height=\"112\" \/><\/p>\n<h4>Issue<\/h4>\n<p>It is not simple to implement a consistent branching model, that complies with the <a href=\"http:\/\/vsarbranchingguide.codeplex.com\/\">VS TFS Branching and Merging Guide<\/a>. Ultimately you would want support for this inside Visual Studio.<\/p>\n<h4>Resolution<\/h4>\n<p>Team Foundation Server has extensive support for version control and branching management through the object model. You can create your own solution, using the sample Visual Studio Extension, in the <a href=\"http:\/\/vsarguidance.codeplex.com\/releases\/view\/96222\">Quick Response<\/a> download package. For an overview see the <a href=\"http:\/\/vsarguidance.codeplex.com\/downloads\/get\/539631\" target=\"_blank\" rel=\"noopener\">Quick Reference Sheet<\/a>, which is also included in the sample code package.<\/p>\n<p><a href=\"http:\/\/vsarguidance.codeplex.com\/releases\/view\/96222\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor;margin-right: auto;margin-left: auto;float: none\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/6724.image_19675DDC.png\" width=\"203\" height=\"39\" \/><\/a><\/p>\n<h4>Sample<\/h4>\n<p>To use the sample, proceed as follows:<\/p>\n<ul>\n<li>Rebuild the sample code using Visual Studio 2012, whereby you require the TFS 2012 Object Model (OM) and the Visual Studio 2012 SDK.<\/li>\n<li>Install the <strong>TfsBranchToolVSExtension.vsix<\/strong> file into Visual Studio 2012, by double clicking on it.<\/li>\n<li>Start Visual Studio 2012 and navigate to Source Control Explorer<\/li>\n<li>Mark a folder and right click on it.<\/li>\n<li>You will now have a new menu, right above the ordinary Branch and Merge menu<br \/>\n<img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/1614.image_thumb_6C1FE802.png\" width=\"234\" height=\"332\" \/><\/li>\n<li>Expand it and you will find an option to Apply an initial structure<br \/>\n<img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/5811.image_thumb_7CB7E2F0.png\" width=\"526\" height=\"377\" \/> <\/li>\n<li>Selecting this command will bring up the model selection form<br \/>\n<img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/7446.image_thumb_67E5EA70.png\" width=\"240\" height=\"143\" \/><\/li>\n<li>In this form you can select the configured branch plans, and set the arguments before applying a branch plan. <\/li>\n<li>Let\u2019s create a Basic Branch plan in a subfolder Basic. This is done by changing the argument RootFolder to <strong>$\/Ranger_Sandbox\/Willy\/BasicDemo<\/strong> and clicking Apply.<br \/>\n<img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/5383.image_thumb_19052511.png\" width=\"521\" height=\"310\" \/><\/li>\n<li>The form shifts to report the progress of applying the selected Branch plan<br \/>\n<img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/2744.image_thumb_77A57F74.png\" width=\"521\" height=\"312\" \/><\/li>\n<li>Once completed you can close the form and take a look in source control explorer at the new branch and folder structure of your new Basic folder<br \/>\n<img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/6064.image_thumb_083D7A63.png\" width=\"520\" height=\"273\" \/><\/li>\n<\/ul>\n<h4>How does it work<\/h4>\n<p>The Visual Studio Extension is built on top of the same engine as the command line utility.<\/p>\n<p>The Engine offers two core services to its clients. The First is a <strong>Branch Plan Catalog Service<\/strong> listing and providing information like Name, Description and the defined arguments for all available branch plans.<\/p>\n<p>The second service is the <strong>Execution Engine<\/strong> that takes a list of arguments and a branch plan and simply executes the selected Branch Plan.<\/p>\n<p>The Execution Engine is based on the **Microsoft Extensions Framework **and a defined schema for defining branch plans. This makes solution very configurable and extensible. The Engine simple assemblies and execute them, as defined in the .branchplan files. Each Action in the .branchplan corresponds to an MEF extended class in an assembly. There are a limited set of Actions provided (and needed) to create the source control structure needed to comply with the different branch plans.<\/p>\n<p>The core actions provided are:<\/p>\n<ul>\n<li>Connect to source Control<\/li>\n<li>Create Folder<\/li>\n<li>Create Branch<\/li>\n<li>Check-In to source control<\/li>\n<\/ul>\n<p>If you want you could easily add your own actions by building a MEF extended assembly, place the assembly in the same directory, and add your action to the .branchplan file.<\/p>\n<h4>Team<\/h4>\n<p><img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/7711.image_thumb_5049BABA.png\" width=\"500\" height=\"75\" \/><\/p>\n<ul>\n<li>ALM Ranger Contributor(s) <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2012\/03\/28\/introducing-the-visual-studio-alm-rangers-esteban-garcia.aspx\">Esteban Garcia<\/a>, <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2011\/03\/28\/introducing-the-visual-studio-alm-rangers-mattias-sk-246-ld.aspx\">Mattias Sk\u00f6ld<\/a>, <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2012\/10\/01\/introducing-the-visual-studio-alm-rangers-tomas-scott.aspx\">Tomas Scott<\/a> and <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2011\/04\/19\/introducing-the-visual-studio-alm-rangers-vladimir-gusarov.aspx\">Vladimir Gusarov<\/a><\/li>\n<li>ALM Ranger Reviewer(s) <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2010\/09\/28\/introducing-the-visual-studio-alm-rangers-michael-fourie-also-known-as-mike.aspx\">Michael Fourie<\/a> | <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2010\/10\/20\/introducing-the-visual-studio-alm-rangers-willy-peter-schaub.aspx\">Willy-Peter Schaub<\/a><\/li>\n<li>Product Owner\/SME: <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2011\/07\/07\/introducing-the-visual-studio-alm-rangers-micheal-learned.aspx\">Micheal Learned<\/a><\/li>\n<li>Ruck Master: <a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2011\/04\/19\/introducing-the-visual-studio-alm-rangers-jahangeer-mohammed.aspx\">Jahangeer Mohammed<\/a><\/li>\n<\/ul>\n<h4>Future plans<\/h4>\n<ul>\n<li>Video on <a href=\"https:\/\/channel9.msdn.com\/\" title=\"https:\/\/channel9.msdn.com\/\">https:\/\/channel9.msdn.com\/<\/a> which explores and explains the design behind this quick response solution <\/li>\n<li>Work with the ALM Rangers \/ ALM MVPs to extend the tooling for the community <\/li>\n<\/ul>\n<h4>More ideas?<\/h4>\n<p><img decoding=\"async\" title=\"image\" style=\"border: 0px currentcolor\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/11\/3324.image_4E4E3776.png\" width=\"169\" height=\"37\" \/><\/p>\n<p><strong>Related Posts<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/visualstudioalm\/archive\/2012\/10\/26\/quick-response-sample-command-line-utility-to-create-tfs-branch-scenarios.aspx\">Quick Response Sample \u2013 Command line utility to create TFS Branch Scenarios<\/a><\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2012\/10\/26\/faq-tfsbranchtool-how-do-i-customi-s-z-e-a-tfs-branching-scenario-plan.aspx\">FAQ &#8211; TfsBranchTool: How do I customi[s|z]e a TFS Branching scenario plan?<\/a><\/li>\n<li><a href=\"https:\/\/aka.ms\/treasure39c\">FAQ: Where is the Branch Plans folder for TfsBranchTool Extension?<\/a><\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/willy-peter_schaub\/archive\/2012\/08\/10\/toc-quick-response-solutions.aspx\">Ranger Quick Response Solutions<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Quick Response samples provide information directly from Visual Studio ALM Rangers working with the Microsoft Visual Studio Product Group and Microsoft Services, in response to feature gaps to supplement the product and knowledge base information. Issue It is not simple to implement a consistent branching model, that complies with the VS TFS Branching and Merging [&hellip;]<\/p>\n","protected":false},"author":77,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[253,226,229,1],"tags":[],"class_list":["post-3893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-devops-server","category-ci","category-community","category-devops"],"acf":[],"blog_post_summary":"<p>Quick Response samples provide information directly from Visual Studio ALM Rangers working with the Microsoft Visual Studio Product Group and Microsoft Services, in response to feature gaps to supplement the product and knowledge base information. Issue It is not simple to implement a consistent branching model, that complies with the VS TFS Branching and Merging [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/3893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=3893"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/3893\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=3893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=3893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=3893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}