Welcome to MSDN Blogs Sign in | Join | Help

How to list the team projects created with a particular template in TFS 2008

This question came up on an internal discussion, and I thought the answer would be useful to post.

Question

How we can find the list of projects created with the a particular VSTF template in Orcas (TFS 2008)? In VS 2005 TFS we can find out programmatically as well with the query but in the new version we are not able to do so.

Answer

Sam Heald, a developer on the work item tracking server team, responded with the following answer.

This information is no longer stored automatically in TFS 2008.

In TFS 2005, a templateId was returned as an out parameter of the GetProjectProperties method on the ICommonStructureService interface.

However, this templateId might not point to the same template used during project creation for that project (deleted/overwritten templates are purged, ids are re-used). Additionally, most project attributes initialized by the project creation wizard (aka PCW) can be customized or changed after the fact.

In TFS 2008, the templateId parameter always returns -1.

If you wish to simulate the old functionality, you can modify your process templates to put the template name in the generic project properties property bag. In the properties element in the classification.xml, you can define name-value pairs to be created at project creation time, e.g.:

<property name="TemplateName" value="MSF Agile v4.0" />

Published Wednesday, November 07, 2007 8:33 PM by buckh

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# VSTS Links - 11/08/2007

GertD on The Data Dude Meets Team Build. Eugene Zakhareyev on Changeset - a unit or set of time? Jeff...

Thursday, November 08, 2007 7:24 AM by Mickey Gousset

# VSTS Links - 11/08/2007

GertD on The Data Dude Meets Team Build. Eugene Zakhareyev on Changeset - a unit or set of time? Jeff...

Thursday, November 08, 2007 7:24 AM by Team System News

# Getting a Process Template for a Team Project in TFS 2008

Buck Hodges recently posted a blog that talked about a change that was made to the GetProjectProperties

Thursday, February 14, 2008 3:00 PM by das Fenster

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker