6

I have searched and just can't seem to find the answer to this question so here goes...

I would like to edit a TFS Process Template to add the following folders to Version Control automatically when I create a new team project:

<teamProject>
  |- DEVELOPMENT
  |- MAIN
     |- BUILD
     |- SOURCE
     |- TEST
  |-RELEASES

Currently I have to add these folders for each new team project created. I'd like a little automation moving forward.

If the process template is not the place to accomplish, I suspect this can be done in the API, but so far unable to find the appropriate point to start.

John Saunders
  • 160,644
  • 26
  • 247
  • 397

3 Answers3

0

A really easy way to do this is to setup the folder structure the way you want in a Temp/Test Team Project and then when you create a new Team Project you will be given the option "Specify Source Control Settings"

enter image description here

In this dialogue, select "Create a new source control branch" Branch from: Select the root of the Temp/Test Team Project.

In this way, all your future Team Projects will have the same structure as the Temp/Test Team Project.

Mike Veigel
  • 3,795
  • 2
  • 20
  • 28
  • Don't you worry about having "branches" which are meaningless? If you had a choice of "copy source control structure from ``", then would you still want to use this "branch" choice? – John Saunders Aug 04 '11 at 19:33
  • It is in a temporary Team Project so it doesn't matter. You can easily, with the new admin tools for 2010, delete a Team Project. We have a SandBox project at our company along with many others for testing. You can choose which Team Projects to view when you connect to the server. It is a very simple solution to the problem and what I would do if I were trying to solve this problem. I understand what you are saying though but I really think if I just wanted to gen up 10 Team Projects this would work well. – Mike Veigel Aug 04 '11 at 21:05
  • Are you aware that branches now have special treatment in TFS 2010? I don't know if this will prove to be an actual "problem" in your case, but it is a difference from previous releases. This isn't just "branching in", like in VSS. – John Saunders Aug 04 '11 at 22:54
  • Two of our Main "Production" Team Projects were created similarly. We are running without issue. – Mike Veigel Aug 05 '11 at 01:20
  • Good luck; hope it works; but make sure you know about [View Where and When Changesets Have Been Merged](http://msdn.microsoft.com/en-us/library/dd405662.aspx) and the other related new features of TFS 2010 to make sure they will work in this environment. – John Saunders Aug 05 '11 at 03:40
0

I choose to create a custom solution (C#) who creates the TP programmatic and then creates a specific source control structure using the TFS Client Object Model.

Regards

0

Have not looked at this in detail, but http://mskold.blogspot.com/2010/10/tfs2010-automated-team-project-creation.html could give you some hints how you can achieve this.

There is also another post on StackOverflow that asked the same question: TFS2010 Automatic folder structure

Community
  • 1
  • 1
Ewald Hofman
  • 12,688
  • 3
  • 39
  • 44