Monday, January 03, 2011
In our company we are currently working with VS2008 and office 2003.  Everything will be upgrade to VS2010 and Office 2010 the comming months.
But some developers already have VS2010.

Since the moment that they have it installed they had problems with VS2008 connecting to excel.
They always got the error "TF86001: Team Foundation was unable to load the office addin" and "TF80042: The document cannot be opened because you don't have Microsoft Excel 2003 or later, or one of its components installed".

The problem is caused bacause of the installation of VS2010.  Here you need at least office 2007 or higher.

The solution for this is easy.  Just follow the next steps:

1) Open a command prompt in admin mode
2) Change the directory to "Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies"
3) Unregister the 2010 add-in version: "regsvr32 /u TFSOfficeAdd-in.dll"
4) Chnage the directory to "Program Files\Microsoft Visual Studio 9\Common7\IDE\PrivateAssemblies" (could also 9.0 instead of 9)
4) Register the 2008 add-in version: "regsvr32 TFSOfficeAdd-in.dll"

This will  disable the office integration in VS2010 and enable it again in VS2008.  You cannot use the tree queries, it has only the ability for flat queries.
Also you can only use VS2008 and not VS2010 for the export to excel.

If you repair your Team Explorer,there is a big change you have to do these steps again.

What if we upgrade to Office 2007 or higher after this change?  Easy just the the opposite.  Unregister the VS2008 add-in and register the VS2010 add-in.

1/3/2011 1:51:09 PM (Romance Standard Time, UTC+01:00)  #     |