Skip to main content

Weblog Ton Stegeman [MVP]

Go Search
Home
  

ODC 2008
If you have a question or suggestion, please contact me through Windows Live Messenger.
My status: .

If I am not online, please send me an e-mail.
Weblog Ton Stegeman [MVP] > Posts > Connecting TFS 2010 projects to SharePoint sites
Connecting TFS 2010 projects to SharePoint sites

The new Team Foundation Server (currently in beta 2) has the option to connect TFS project to an existing SharePoint site. This also allows you to specify on which SharePoint server to create new project sites. For us this is important, because a lot of our projects start way before the TFS project gets created. Then we end up moving all files to the TFS project site, or we have two project sites for the same project. When we go live with TFS2010, we no longer have to transfer files. And we can host the TFS project sites on our company SharePoint implementation, which means 1 WSS server less to maintain. With one of my colleagues we managed to get this working in our test environment. This post shows you how we have set it up.

Step 1 – Configure SharePoint site setup

TFS has two options for linking TFS projects to SharePoint sites, and it is important to think about this before you start configuring:

  • Automatically – if you create a new TFS project, TFS will automatically create the new SharePoint site for you. This will be a sub site in the site collection that you specify for for each Team Project Collection in  TFS. This collection is a group of TFS projects. For each new project, a new subsite is created in this site collection. If this site collection is using a managed path, you will have to remember this managed path.
    image 
    Apart from the managed path (in case you are using that) you need to remember the web application that hosts your site collection(s) and the service account that runs the application pool of this web application. You can also configure TFS to automatically create the site collection that is associates to your project collection (make sure self service site creation is switched on!). We have not yet tested this setup.
  • Manually – You are manually creating SharePoint project sites and your TFS projects and after both are created, you manually connect them from TFS. If this is the case, you will need to write down all the SharePoint application URL that will host project sites, including their application pool accounts. If these SharePoint sites are using managed paths, you need to write down these as well.

We will go for the second option, as we want some more control over where the SharePoint sites are created. Apart from that, they probably already created before the TFS project is created. The samples below show our very simple test setup. We have configured 1 web application, with 1 managed path (tfsprojecten). We will manually create a site collection for each project at the url http://<web_application_url>/tfsprojecten, and connect the TFS project later on to the root site of that site collection.

Step 2 – Configure TFS connection to SharePoint

In this step we will configure which SharePoint service accounts have access to TFS. On the TFS server, start the Team Foundation Server Administration Console. In the Application Tier select SharePoint Web Applications.

image

In the lower section of the screen, “Service Accounts for SharePoint Web Applications”, add the accounts for 2 web applications:

  • The Central Administration web application
  • The web application that will host your project sites (can be accounts of multiple web applications)

The accounts that you need to add here are the accounts of the application pools that are associated with these web applications:

image

For the next step, we stay in the console on the same screen. In the SharePoint Web Applications section, click Add SharePoint Web Application:

image

Enter a friendly name for the web application, that makes it easy to recognize. Fill in the url of the web application (step 1) and the url of the SharePoint Central Administration site. If you have your site collection(s) using a managed path in SharePoint, enter this managed path in the Default location textbox.

Step 3 – Configure SharePoint connection to TFS

Before we configure the connection from SharePoint to Team Foundation Server, make sure the Team Foundation Server Extensions for SharePoint Products are installed in the SharePoint farm. See the installation guide for more details. On the SharePoint server, start Team Foundation Server Administration Console. Select Extensions for SharePoint Products. Click the Grant access button to setup a new connection.

image 
Enter the url to your TFS server and select a web application. If you have configured a managed path in SharePoint and you want to enforce TFS to create all new site collections for new project collections in that path, enter your path here as well.

Step 4 – Configure the project collection(s)

If you have already added created project collections in TFS, you need to configure the connection for each collection to SharePoint. On the TFS server, start the Team Foundation Server Administration Console. Select Team Project Collections and select your collection. Navigate to the SharePoint Site tab.

image

Click the Edit Default Site Location button. Select your web application (recognizable from the friendly name you configured in step 2). Check if TFS configured the url for your site collection correctly. If you configure the connection manually, this has to be an existing site collection, and the url that TFS suggests here (based on your input from previous steps), must match the url of that site collection.

image

If the url does not match, you can manually change the path here. If you want TFS to do the work for you, you are done now. As soon as you add a new TFS project to the project collection, TFS will create the new project and the wizard will ask you for the required details:

image

If the url that the Team Explorer wizard proposes here does not match your SharePoint site collection, you can correct it here, or check the previous steps if you have missed one.

If you did not yet create a project collection, or want to create a new one, you should also be ready now. As soon as you create a new collection from the console, the wizard has an extra step SharePoint Site. In this step a new site collection gets created in the web application that you select from the dropdown (again, recognizable from the friendly name):

image

Step 5 – Configure the connection manually

In our case we wanted to configure a TFS project to an existing SharePoint site. You can manually configure this connection from Team Explorer. Right click the project, select Team Project Settings and select Portal Settings.

image

Next, check the Enable team project portal checkbox in the popup window. Then click the Configure URL button. In the popup windows that appears, select the web application that hosts your SharePoint site.

image

If the url that is suggested here does not match the url of your SharePoint site, make sure you did not miss one of the previous steps, or manually change it.

Step 6 – Configure your SharePoint site

This step is only relevant if you manually connected your TFS project to your SharePoint sites. If TFS created your team site, the site is already configured based on the template. If you successfully connected your TFS project and SharePoint team site, you can start using web parts from the new Visual Studio Team System Web Part Collection. To use these web part, active this site collection feature:

image

Now you can use these web parts on any SharePoint page in your site. Simply add one or more web parts to a page and configure them. The screenshot below shows the home page of a Collaboration Portal that is configured as the project site for our test project in TFS.

image

This is not something that I would recommend or would do in our production environment once we migrate to 2010, but it shows that the integration of TFS in SharePoint is built very nicely using web parts, which makes it very flexible. The web part collection has a number of different types of web parts. The screenshot below shows an overview.

image

These webpart are pretty clever. They ‘know’ the connection to the team foundation server themselves. If you add the Team System Web Access Shortcut Web Part for example, you do not need to configure it. It automatically finds the connection to the TFS server and renders the correct link to TSWA. Nice!

Other web part, like the Query Results Web Part need some additional configuration. Using the Query Picker, you select one of the queries on that’s it. You have a web part in your site showing all your open tasks for example:

image

Conclusion

Hope this post helps to clarify a bit how SharePoint 2007 and TFS 2010 will integrate. I would recommend playing around with this in a lab environment to find the best option for your organization. Put a TFS administrator and an experienced SharePoint administrator in the team to set this up, because together these people should be able to figure out how to set it up. We have done this and are enthusiastic about the options this gives us in the near future!

Starting point for your journey should be the MSDN documentation.

Comments

TFS 2010 with SharePoint 2010?

in our lab, I already have SharePoint 2010. Is it possible to configure TFS 2010 with SharePoint 2010? Can you point me to any config instructions? I can only find instructions for SharePoint 2007. Thanks!
at 1/26/2010 3:42 PM

Don't know

We haven't tested TFS2010 and SharePoint 2010 yet. We don't have SharePoint 2010 running in our environment yet.
Ton Stegeman at 1/31/2010 6:41 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Your city *


Type the name of the city you live in (making it easier to handle spam...)

CurrentDate *

Select the current date (see if this gives me fewer spam...)
Attachments

 Links

  SharePoint Object on CodePlex
  Screencast introducing SharePoint Objects
  Content by Type and Filter Web Parts on CodePlex
  Archive
  Archive (Calendar)

 My Latest Blog Posts

Scripting SharePoint 2007 setup: choices and conceptsUse SHIFT+ENTER to open the menu (new window).
Adventures in Visual Studio 2010: Migrate the Content By Type web part to SharePoint 2010Use SHIFT+ENTER to open the menu (new window).
Register SharePoint themes by using a featureUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010 development on Windows 2008 Server R2 – Getting StartedUse SHIFT+ENTER to open the menu (new window).
New release SharePoint Objects: features and groupsUse SHIFT+ENTER to open the menu (new window).
Constructing the url to the SharePoint Edit Permissions pageUse SHIFT+ENTER to open the menu (new window).
Screencast: introduction to SharePoint ObjectsUse SHIFT+ENTER to open the menu (new window).
SharePoint 2007 and Reporting ServicesUse SHIFT+ENTER to open the menu (new window).
SharePoint Objects – Insight in usage of your SharePoint artifactsUse SHIFT+ENTER to open the menu (new window).
SharePoint 2007 Custom list schema and the Content Query Web PartUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010 Silverlight Client Object Model – ExecuteQuery vs ExecuteQueryAsyncUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010, the Client Object Models and Bing MapsUse SHIFT+ENTER to open the menu (new window).
Having fun with SharePoint 2010, Silverlight 3 and Bing MapsUse SHIFT+ENTER to open the menu (new window).
Connecting TFS 2010 projects to SharePoint sitesUse SHIFT+ENTER to open the menu (new window).
Adding a database to the SharePoint database Server using SPDatabaseUse SHIFT+ENTER to open the menu (new window).