16 Feb 2010

Connecting Visual Studio 2008 to Team Foundation Server 2010

6 Comments Uncategorized

With the recent release of Visual Studio 2010 RC, I decided to take Team Foundation Server (TFS) 2010 RC for a spin also.  I was really interested in seeing what new and great features are being offered, because there has been a lot of buzz around this release of TFS. 

After installing Visual Studio 2010 Ultimate on my laptop and setting up TFS 2010 as a new install, which was way easier than I remember 2005 being, I connected up VS 2010 and TFS 2010 with out a problem. 

However I ran into a ton of problems trying to get Visual Studio 2008 connected to TFS 2010.  I eventually had to resort hacking the registry to get everything to work as it should.  Here are the steps I used:

  1. Click Add Existing Team Project Button
    step-1
  2. Click Servers Button
  3. Click Add… Button
  4. Type in full server name with collection specified and trailing slash, it complains if there is no trailing slash
    step-4 
    If you actually try to use this to select projects to edit, everything will look like it went smooth.  However you will notice that no projects actually show up in the Team Explorer
  5. Close Visual Studio
  6. Remove the trailing slash from the registry key of the server you just added here:
    HKEY_CURRENT_USER/Software/Microsoft/VisualStudio/9.0/TeamFoundation/Servers
  7. Open Visual Studio
  8. Connect to your TFS 2010 server and select the projects that you want to use in 2008.

Hope this helps somebody else down the line as I am sure more and more people are going to run into this problem as they adopt TFS 2010.

Note: You can do this in all one step by just adding the value into the registry, I just find this way a little more visually pleasing for explaining the concept in the blog.

Tags: ,
written by
Nick Berardi
subscribe
If you found this post valuable and would like to see more like it you can follow me.

6 Responses to “Connecting Visual Studio 2008 to Team Foundation Server 2010”

  1. Reply Rob says:

    Followed the instructions and came up with an error:

    TF30335: The server name cannot contain the characters ‘/’ or ‘:’, or start with ‘http://’ or ‘https://’. If the server name is an IPv6 address, it can contain the character ‘:’ only if the full name is enclosed by square brackets.

  2. Reply kevinv says:

    I get the same error. it seems i cant even get started. very frustrating, but I am developing ssis so moving to vs2010 isnt an option

  3. Reply Kelly says:

    I had the same problem and a forward compatibility patch wouldn’t installed because it mysterious enough had nothing to update… Then I found a post somewhere to add a string-value to the registry at the key

    “HKEY_CURRENT_USER/Software/Microsoft/VisualStudio/9.0/TeamFoundation/Servers”

    Add a new String Value in there and make the name of it the name that you want to call your server connection. Make the Value “http://127.0.0.1:8080/tfs/DefaultCollection“. Replace the 127.0.0.1 with the ipaddress or name of your server. Replace the tfs with the server’s instance(default is tfs). Replace the DefaultCollection with whatever your collection is named (default is DefaultCollection).

    Make sure to close VS2008 first so it picks up the changes when you load it after editing the registry… Now open VS2008 -> View -> Team Explorer. Click on the + in the new pane and TFS asks you to login :)

    (source: http://nightbugs.wordpress.com/2009/08/17/tf30335-could-not-connect-to-the-tfs2010-server-through-visual-studio-2008-client/)

  4. Reply Cliff Cotterill says:

    I tried your solution and when in Visual Studio 2008 I attempt to ‘Add Project to Source Control’ there is a Microsoft Visual Studio Error:

    Value cannot be null.
    parameter name: name

    The same error occurs when File->Open Team Project.

    I tried several registry entries and none of them resolved the error.

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\TeamFoundation\Servers]
    @=”http://servername:8080/tfs/DefaultCollection”
    “tfsservername”=”http://servername:8080/tfs/DefaultCollection”
    “servername”=”http://servername:8080/tfs/DefaultCollection”
    “name”=”http://servername:8080/tfs/DefaultCollection”

  5. Reply Ken Almond says:

    In my case – I didn’t have the VS2008 Team Explorer component (the team was using VSS). So I installed it and then the patch and then the registry edit but it didn’t work.

    What you have to do
    1) Install VS2008 Team Explorer component
    2) Use Tool->Options->Source Control to swith to “Visual Studio Team Foundation Server”
    3) Then re-install VS2008 SP1 AFTER you have added the Team Explorer component
    4) Install VS2008 SP1 ‘forward’ patch – VS90SP1-KB974558-x86.exe – AFTER VS2008 SP1
    5) Set the server URL via the registry (as noted above) becaue the dialog doesn’t form the correct string – e.g. http://:8080/tfs/defaultcollection
    6) Use Tools -> Connect to Team Foundation Server
    7) And FINALLY – you will have access toTeam Explorer window and Team Explorer tool bar.

  6. Reply Laurie says:

    Thanks for the instructions! It worked great for me.

    I will note that I had already installed the VS 08 SP1, and the VS2008 SP1 ‘forward’ patch before I had got to your instructions. So maybe that would help other users.

Leave a Reply