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" />