Enter the Coolest Team System Gadget Contest!

Fellow Team System MVP Mike Azocar has announced an awesome new contest to stir up the Team System tools ecoystem.  There are some really cool prizes so far including a free license for Microsoft Visual Studio Team Suite 2008 w/ MSDN Premium Visual Studio Team System Logosubscription and there are more donated prizes coming...  Get the full details at his blog post:  Want to be famous- Enter the Coolest Team System Gadget Contest!

Have you created a useful gadget for Team System? Do you have one in mind? I am looking for the coolest community built tool for VSTS. It can be something for TFS, for Visual Studio, or something that is stand alone. The winner will receive a one year subscription to MSDN with Team Suite!

To enter, submit a screen cast (up to 3 minutes long) which tells everyone why your gadget is the coolest and the source code. All submissions will be released to the public as free source to use and enjoy (with you getting all the credit of course). Videos will also be made available to the public to help make you famous! This should be something new (i.e. not on Codeplex or previously released) and not something repackaged. Submissions accepted up until August 31st 2008. Winner will be announced September 15th 2008.

Judges will be Mike Azocar, Martin Woodward, and I so this is going to be a lot of fun!


Ed B.

Posted in TFS | Tools | VSTS | VSX

New Visual Studio Extensibility Book Available

There is a new book about VSX out from Wrox called “Professional Visual Studio Extensibility” and looks pretty promising if you are first starting out to learn add-ins and VSPackages.  It's actually the first one that I've seen get released so I hope it does well.  VSX is a topic that I have a keen interest in.

  • A quick overview of Visual Studio Shell and Domain-Specific Languages Tools
  • Techniques for creating, debugging, testing, and deploying your add-ins
  • Ways to work with user interface elements, Windows Forms, and controls via code in your add-ins
  • Steps for extending Visual Studio functionality using VSPackages
  • Tips for writing and managing code snippets to make your coding process easier
  • Using Visual Studio templates to save time when writing code for common projects
  • How to use MSBuild to write custom builds for Visual Studio and .NET applications
  • New techniques for recording, developing, debugging, deploying, and running macros


Ed B.

IEventService: Filter Expressions, Event Types

When playing around with this Interface you will notice that it is very easy to subscribe and unsubscribe to events via the TFS Object Model.
The method signature for Subscribing to an event is:


int SubscribeEvent (
        string userID,
        string eventType,
        string filterExpression,
        DeliveryPreference preferences

As you can note there is several string values that are needed to pass in. I found no documentation on what eventTypes
or Filter expressions were available.  Hopefully the following information will help you as you develop with the
Object Model.

UserID: simple enough. 
eventType: Out of the Box
  • AclChangedEvent
  • BranchMovedEvent
  • BuildCompletionEvent
  • BuildStatusChangeEvent
  • CheckinEvent
  • CommonStructureChangedEvent
  • DataChangedEvent
  • IdentityCreatedEvent
  • IdentityDeletedEvent
  • MembershipChangedEvent
  • NodeCreatedEvent
  • NodePropertiesChangedEvent
  • NodeRenamedEvent
  • NodesDeletedEvent
  • ProjectCreatedEvent
  • ProjectDeletedEvent
  • WorkItemChangedEvent

To view event types on a certain TFS server you can consume http://ServerName:8080/Services/v1.0/Registration.asmx to enumerate through the list
or, you can use the IRegistration interface and loop through each RegistrationEntry for each EventType.

Filter Expression:

  • PortfolioProject
  • System.AreaPath
  • System.AssignedTo
  • System.AuthorizedAs
  • System.ChangedBy
  • System.ChangedDate
  • System.Id
  • System.IterationPath
  • System.OpenedBy
  • System.Reason
  • System.State
  • System.Title
  • System.WorkItemType

Example expression:

Condition String = "PortfolioProject" = 'Project Name' AND ("CoreFields/StringFi
elds/Field[ReferenceName='System.AssignedTo']/OldValue" = 'Ed Kisinger' OR "Core
Fields/StringFields/Field[ReferenceName='System.AssignedTo']/NewValue" = 'Ed Kis
inger') AND "CoreFields/StringFields/Field[ReferenceName='System.AuthorizedAs']/
NewValue" <> 'Ed Kisinger'

Ed K.
Posted in TFS | VSX

TFS Authentication

Say you built an application that connects to TFS and you want a dialog box to appear if a user is not authorized to connect to TFS. To do this is quite simple.  There are two methods you might have seen when you are playing with the TeamFoundationServer object, Authenticate() and EnsureAuthenticated(). The difference between the two is Authenticate will always call the server and EnsureAuthenticated will only be called if the user has not already authenticated to the server. You should use the EnsureAuthenticated method as a performance point since you only want the call to go to the server if the user has not authenticated. Notice we are using the TeamFoundationServer constructor instead of the Factory; you can use the factory if you wish. The deciding point that you need to decide is if you want to reference the same object on subsequence calls and without the need to re-authenticate. Remember the factory method will return a cache instance of the object.


TeamFoundationServer tfs = new TeamFoundationServer(TFSServerName,new UICredentialsProvider());



If the user presses cancel on the dialog box then a UnauthorizedException will be thrown ,so handle it gracefully.


Ed K.

Posted in TFS | VSX

Connect to TFS via Client Object Model

Here is a simple example of how to connect to a Team Foundation Server and display some of its properties.

To start we need to fire up VS 2005 and create a new console application.

Now that we have a new project we need to add a reference to Microsoft.TeamFoundation.Client.

Now we can access the TeamFoundationServer object. To create an instance of the object we will use the TeamFoundationServerFactory, we are using the factory so that we create a cache version of the object for subsequence calls.

 TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("FriendlyNameOfYourTFSServerOrURL");

Now lets display some data:

Console.WriteLine("The Authenticated User is: {0}", tfs.AuthenticatedUserDisplayName);
Console.WriteLine("TeamFoundationServer Name: {0}", tfs.Name);
Console.WriteLine("TeamFoundationServer Object GUID: {0}", tfs.InstanceId);

Here is the OutPut:

Thats it! Very simple and fun.


Ed K.

Posted in TFS | VSX