Premier Field Engineer, Microsoft Services Customer Service and Support
Update: You should read this post in conjunction with Taylor's blog post: Introducing the TfsConnection, TfsConfigurationServer and TfsTeamProjectCollection Classes
Based on feedback that we received both internally and externally we decided to make a rather significant change to the TFS client object model. This change centers around the TeamFoundationServer, TeamFoundationApplicationInstance and TeamFoundationServerBase classes and their supporting factories.
First some background. In Orcas and Whidbey the TeamFoundationServer object was used as the starting point for working with the Team Foundation client object model. In TFS 2010 we now have Team Project Collections and the Team Foundation Configuration Server and unfortunately the TeamFoundationServer object is no longer specific enough to describe the end point that you are working with.
To combat this originally we decided to repurpose the TeamFoundationServer class for talking to Team Project Collections and introduce a sibling class called TeamFoundationApplicationInstance for talking to what was at the time called the Application Instance and has since been renamed to the Configuration Server. We also introduced a base class called TeamFoundationServerBase to contain all of the shared code between the TeamFoundationServer and TeamFoundationApplicationInstance classes.
Martin Woodward describes this old model in his first TFS 2010 API By Example post.
Since we made that original change, we have gotten feedback both internally and more recently externally that these objects were very confusing. Because of that feedback we decided to make some changes to these objects to make them more intuitive. The main changes that were made are as follows:
If you have started writing tools that use the TFS 2010 Beta 2 object model, you should anticipate these changes in our final release and allow yourself time to make the changes and test them.
Here are some of the things that have changed throughout this refactoring and some things that you should look for and validate if you are reviewing these changes:
If you have an addin or tool built against the Beta2 object model and you don’t have the Beta2 assemblies installed, then you’ll get something like the following error:
Team Foundation Error
Could not load type 'Microsoft.TeamFoundation.Client.TeamFoundationServerBase' from assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. System.TypeLoadException: Could not load type 'Microsoft.TeamFoundation.Client.TeamFoundationServerBase' from assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Could not load type 'Microsoft.TeamFoundation.Client.TeamFoundationServerBase' from assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
System.TypeLoadException: Could not load type 'Microsoft.TeamFoundation.Client.TeamFoundationServerBase' from assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
To fix this, you’ll need to contact the addin/tool owner to get them to release a compatible version with the changes mentioned in this post.
So if I had the tool that was built for v9.0.0.0 of the assemblies, should I expect it to just work with TFS2010, or I need to rewrite?
In short, as long as your tool is able to connect to a 2010 URL & you have Team Explorer 2008 & the Forward-Compat GDR installed, it should continue to work.
You obviously won't be able to make use of any of the new TFS2010 features.
That's not what concerns me. Suppose a customer has my tool that works fine on top of Team Explorer 2008. It does connect to both 2008 and 2010 servers. Now customer upgrades the Team Explorer to 2010, will the tool continue to work?
The tool will only work if they ALSO have Team Explorer 2008 installed.
If you want your tool to work when ONLY Team Explorer 2010 is installed, you'll need to recompile against the v10 assemblies and redistribute.