Skip to content

Use Team Foundation Server (TFS) as your Source Control in SSMS

by Dan Thompson on January 28th, 2012
Source Control in SSMS

Update:
This also will allow you to connect to visualstudio.com

If you want to start using Team Foundation Server as your source control in SSMS it’s fairly easy to set up. Microsoft have made available to download the MSSCCI providers which supply support for source control to a list of products which don’t natively support TFS.

This post assumes you already have a TFS server set up and running. In my case, I already have Visual Studio 2005/2008 and can connect up to my 2008 server already using the built in support for TFS. But you don’t need to have VS installed to use SSMS with TFS.

First of all, you’ll need to install the TFS provider. There are a few different versions of the TFS provider. In my case, I’m connecting to TFS server 2008, so I can use any version of the TFS provider which is 2008 or above. For the 2010/2012 versions there are 64-bit or 32-bit build . I’m running Windows Server 2008 R2 (64-bit) as my OS and in control panel I have SQL Server 2008 R2 (64-bit) installed. However, my version of SSMS is 32-bit. You can check easily by opening SSMS and opening task manager. The *32 at the end of the ssms.exe entry shows it is 32-bit.

Task Manager showing SSMS 32-bit

Task Manager showing SSMS 32-bit

So in this case I chose to install the TFS 2010 (32-bit version) which works fine for me, but for ease below are the links to the Team Foundation Server MSSCCI providers:

To be on the safe side, close SSMS before running the installation.

Once installed, go into SSMS. Then in the Tools menu right down at the bottom you have options. In the options window in the tree navigation you’ll have options for Source Control (as below).

If the installation went OK and you have installed the correct version, you should have “Team Foundation Server MSSCCI Provider” available. Select this provider. There are some additional settings which can be tweaked, but are more preferences than settings to get source control working. (Click OK to save your settings changes).

To connect up to TFS, look in the File menu, and go to Source Control and select Open From Source Control:

Source control menu in SSMS

Source control menu in SSMS

You’ll be prompted to select a server:

Connect to a Team Foundation Server

Select a TFS server to connect to

As this is the first time we’ve opened it, there are no servers to pick from. Click Servers… and click Add… to enter the details of the TFS server you wish to connect to. You may be prompted to enter credentials here. Click Close and Cancel.

Now you can create new projects (or open existing ones) to/from TFS.

To create a new project. Select File…New…Project in the usual way, but ensure that the tick-box Add to Source Control is ticked:

SSMS New Project add to Source Control

SSMS New Project add to Source Control

Hope that provides you with enough information to start adding your SSMS solutions into TFS. Now I can create a library of all our job scripts for a particular server and add the solution into TFS all via SSMS without needing to use VS! Please feel free to add comments of your own implementation experiences and how TFS is going to benefit you via SSMS!

  • Yogesh Digambar Sapre

    We have a TFS server 2008 and there is one issue raised by our management team that when any user clicks on the source control panel heshe able to see the all existing projects throughout the organization however they are not able to access those project since they don’t have the permissions.Is there any way in source control to hide those projects on which user don’t have any permissions (only to show the projects on which user have permission).

    Please advise.

  • Yogesh Digambar Sapre

    We have a TFS server 2008 and there is one issue raised by our management team that when any user clicks on the source control panel heshe able to see the all existing projects throughout the organization however they are not able to access those project since they don’t have the permissions.Is there any way in source control to hide those projects on which user don’t have any permissions (only to show the projects on which user have permission).

    Please advise.

  • mi.ma

    Hi… I tried installed “Visual Studio Team Foundation Server MSSCCI Provider 2010 64-bit” (as having Win 7 64 bit) but not showing TFS under File > Source Control in SSMS. Also not found under Tool > Source control > Plug In selection.

    I am having MS SQL server 2008 R2 and Visual Studio 2010.
    Please help. I have VSS 2005 install and able to see the same under SSMS > File > Source control.

    Plz help

  • Joseph Brown

    this is the one that works with SSMS, the others do nothing

    http://technet.microsoft.com/en-us/library/ms173550(v=sql.105).aspx

  • http://jaysonknight.com/ Jayson Knight

    Doesn’t work with SSMS 2014.

    • Dan Thompson

      Hi Jayson,
      I’ve just had a go at my end connecting SSMS 2014 up to TFS 2013 and it has worked ok for me. Let me know more details if you’re having problems and I’ll see if I can recreate at my end for you.
      Thanks,
      Dan

  • Dan Thompson

    It’s worth noting this still works with TFS online (visualstudio.com). You can connect SSMS up to https://myprojectname.visualstudio.com and it works very similarly to as if it was local TFS

    • Dan Thompson

      @Attila226 asked me via Twitter which MSSCCI version to use with TFS Online (visualstudio.com) – Visual Studio online is compatible with Visual Studio 2012 or 2013. It’s a lot easier to connect out of the box with 2013, but still possible via 2012. In light of this, any of the TFS 2012/2013 MSSCCI versions should work – make sure you pick the correct architecture (32/64) based on the above method.
      hope that helps!

  • Itamar

    Hi.
    In my case I couldn’t install any of the clients because of this error message:
    “Microsoft Visual Studio 20XX Team explorer or its tools are not installed or registered.
    Please install or repair your Team Foundation Client Installation”

    • Dan Thompson

      Hi Itamar, did you get that error during the MSSCCI Provider? Which Provider are you trying to install?

      • Itamar

        I’ve tried both (2008 & 2010) MSSCCI providers.
        eventually, I’ve installed Team explorer, and now it is working. Thanks! :-)

  • Monkey

    Hi Craig, at the end of your server adress add the collection name.
    So something like http://…./tfs/MyCollection

  • Craig Humphrey

    Great post Dan, but it only lets me connect to the DefaultCollection on my TFS2012 server. I have a number of Team Project Collections set up, but I can’t see a way to specify which one to use when connecting from SSMS.
    Any ideas?
    Thanks
    Craig

    • Dan Thompson

      Hi Craig, Monkey’s right, you’ll need to go into ‘servers…’ and add additional entries for each project you want to connect to, and it should be either in the format

      http://TFS-SERVER-HERE/TFS/ProjectNameHere
      or
      https://TFS-SERVER-HERE/TFS/ProjectNameHere
      /tfs/ is the default installation point, but it can be changed so this may be different for some

    • Dan Thompson

      Hi Craig,
      When I’m prompted to Connect to a Team Foundation Server it shows up as servername/DefaultCollection for me also, however when I press ok, it brings up a list of projects and folders that I can see on the server.
      If it’s not the same for you, you might want to try monkey’s suggestion below. Can you connect to the project you’re trying to access via the web TFS interface or via Visual Studio? (Just ruling out any permissions issues).
      Thanks,
      Dan

      • Craig Humphrey

        Hey Dan,
        LOL we currently have no project under the Default Collection, as we’d set up separate collections for particular streams of work (one for our BI/SQL stuff and another for our Word2010 templates).
        Using Monkey’s tip to specify the Collection on the URL worked a treat!
        Thanks
        Craig