Blogger news

2012-07-24

Connecting Visual Studio 2008 to TFS 2010, 2012 and the TFS Service Preview


Not all of us are so lucky that we can work with the latest bits at all time. Especially the folks that are in the Microsoft BI area always seem to be behind a release or two. This has always resulted in issues connecting to TFS from their version of Visual Studio.

For quite some time there has been a Forward Compatibility Patch for Visual Studio 2008 to connect to TFS 2010. But when it came to this patch, installation order was very important. If you wanted to use both BI Studio and connect to TFS the correct order would be:
  1. Visual Studio 2008
  2. Team Foundation Client 2008
  3. Visual Studio 2008 SP1
  4. Optionally: SQL Server BI Studio 2008 r2 (BIDS)
  5. Visual Studio 2008 Forward Compatibility Patch for TFS 2010
If you installed SQL Server BI Studio 2008r2 before installing Team Foundation Client chances are you wont be able to connect to TFS 2010 at all and you're most likely to get the following error message:
TF30335: The server name cannot contain the characters '/' or ':', or start with 'http://' or 'https://'
In the past the only way to correct this, was to remove the forward compatibility patch, remove Visual Studio 2008 SP1, repair Visual Studio 2008 and then re-apply them in the correct order. With some luck that would bring it back to life.

Now there's an easier solution. Just apply the new Forward Compatibility Patch for TFS 2012 and the Team Foundation Services after all of the earlier mentioned items. And as a bonus you'll be able to connect to the latest versions of TFS as well. On top of that it also fixes a few other issues.

Another important note: Visual Studio 2008 and below don't understand the concept of Project Collections. So when connecting to a TFS 2010 or later, you need to tag the project collection onto the url of the TFS Server.

For TFS 2010/2012 and newer this defaults to: https://[server]/tfs/[ProjectCollection]

For Team Foundation Service this defaults to: https://[youraccount].visualstudio.com/DefaultCollection

To connect Visual Studio 2005 to TFS 2012 or the Team Foundation Services, check out this other post.