tags:

views:

440

answers:

1

I am in the process of learning about using the TFS SDK to fully control what Team Foundation does programmatically like:

  • Creating new Workitems(is this the same as creating change requests?)
  • Creating new team projects
  • Creating a new Source code branch,etc.

I am developing a Windows app that can include all these tasks so it can be automated.

I know I have to use VersionControlServer.CreateBranch() to create a source branch. And, is it true that we cannot create new Team Project using the SDK? What about in VS 2010 SDK? I know how to manage workitems programmatically.

Anyone has suggestions on how to create new change requests?

Thanks in advance, -Tara

A: 

If you take a look at the TFS SDK it has examples on creating work items, working with version control etc.

To create a new Team Project then you must use Visual Studio to do that - however in VS 2008 SP1 with the latest version of the TFS Power Tools installed you can make use of the new tfpt createteamproject command to script this process (though all those dependancies need to be installed on the machine running the application that you are thinking about building)

Martin Woodward
Thanks Martin but i want to know the difference between change requests and work items. Work items generally only include bugs,tasks,etc. right? How to specifically create new CRs? I think only creating workitems is covered in MSDN...
TS
So - in TFS a "work item" is just a general term for any work item type defined in your TFS process template. Those work item types are completely customizable. If you wanted you could create your own "Change Request" work item type in the team project and then have your app create one of those. For more information search for "tfs customizing work items". Good luck - and let us know how you get on.
Martin Woodward
Thx! I have finished The task of creating new work items. I have emailed you regarding my next query which is related to the following:Selecting a only few changesets and building it to setup a release package;Similarly selecting few work items and building it;Creating New Source code branches,etc.But I realised that in all probability this would break the build, as the changesets will depend on each other. Example-If I have a set of 15 changesets checked in, and I select the first and last ones alone to build, the build will fail right? How can I work around these issues? Hope you can help.
TS