October 19th, 2007

TFS plugin compatibility between TFS 2005 and TFS 2008

Brian Harry
Corporate Vice President

As I’ve written many times, we strove to maintain a very high degree of compatibility between TFS 2005 and TFS 2008.  One result is that either client can be used with either server.  However, our success was not without exceptions.  One of those is that any code you’ve compiled against the TFS 2005 object model will always run against the 2005 object model, never the 2008 object model.  In many cases this is fine because the TFS 2005 object model works just fine against a TFS 2008 server. However, there are some cases where it is problematic.  The biggest issue occurs when you are loading code that was compiled against the TFS 2005 object model into the same process as code compiled against the TFS 2008 object model.  It will load both versions of the object model into the process (assuming both are installed; it will fail to load if either is not).  Even this is OK in many cases – if the two pieces of code don’t talk to each other.  However, if they need to exchange TFS objects/interfaces, the code won’t work. A very concrete example of this is checkin policies that were compiled against the TFS 2005 object model being loaded into Team Explorer 2008 (which, of course, was compiled against the TFS 2008 object model).  To be even more concrete, the latest release of the TFS Power Tools have some very handy checkin policies that don’t work right now with TFS 2008 for the above reasons.  …and I’ve gotten a few complaints about that 🙂 One answer is to wait until the next release of the Power Tools that is built against the TFS 2008 object model (which is what I’ve been telling people).  Well, thanks to Ed Hintz, you now have another option.  We didn’t actually change the vast majority of the TFS API – it’s just a .NET Framework version binding artifact that keeps it from working.  There is a way to cause the .NET Framework to “redirect” binding requests to alternate versions.  In this case, you can tell it to redirect requests to load the TFS 2005 object model to instead load the TFS 2008 object model.  In this way, you can get the TFS Power Tool checkin policies (and other similar add-ons) to load and run properly in Team Explorer 2008 and don’t have to wait for the next Power Tool release. Read Ed’s blog post for the specific steps necessary to enable these binding redirects and start using your existing Team Explorer extensions today!

Brian

Topics
TFS

Author

Brian Harry
Corporate Vice President

Corporate Vice President for Cloud Developer Services.

0 comments

Discussion are closed.