TFS ships with an event subscription tool that you can access through command line and it’s located at “C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\TF Setup”. You can use it to subscribe to a variety of TFS events dealing with builds, check-ins, projects, work items, etc. You can subscribe to a handful of events from the team project node in team explorer, but this gives you a much bigger list. In order to get notifications when the build fails or partially succeeds (which means that your assemblies built, but your tests failed), you would do the following:
bissubscribe /eventType BuildCompletionEvent /address you@email.com /deliveryType EmailHtml /server yourTfsServer /filter “TeamProject = ‘TeamProjectName’ AND (CompletionStatus=’Failed’ OR CompletionStatus=’Partially Succeeded’)”
There’s also a UI for it in CodePlex that will allow you to do the same if you don’t want to deal with command line.
Mark Allen
Another approach which works well is to have the XML tag reference a custom TFS group. In my case there is a master contributor group shared between projects so rather than list all the contributor users in the template AssignedTo list boxes I created a TFS group called ‘TeamAssignments’ and within security I referenced the team. Then in the templates I added the tag ListItem value=[project]\TeamAssignments. Now when anyone is added to the team they are displayed in the AssignedTo List box. This also means that another team can be created without changing the templates as the changes can be done in security.
TFS Team Name: Blue (example set up in security)
TFS Group Name: TeamAssignments
Members: Team Blue