Common TFS Tasks

This article is designed to give guidance around common tasks that users and administrators do in Team Foundation Server (TFS). Herein will be provided steps (or links to other articles containing the steps) to start with a completely brand new TFS Team Project and walk-through together the things that you will likely want to do. The following is a list of the typical kinds of things that can be done with TFS:

  1. Create a New TFS Team Project
  2. Set TFS Permissions
  3. Check-In Code
  4. Create a Build Definition
  5. Produce a New Build
  6. Create a Test Environment
  7. Run Tests
  8. Publish Test Results
  9. View TFS Reports
  10. Generate TFS Reports

Most of the tasks can be done in the Visual Studio IDE, but some cannot. In those cases, the utility or application needed to accomplish the task will be specified.

Creating a New TFS Team Project

Internally, there is an article that gives good directions on how to create a new TFS Team Project. Similarly, you can get to it through the TFS Administrative Tasks article of links to guidance for TFS Tasks. One of the TFS Tasks links under the Team Project Tasks section points to the article that provides instructions on Creating a New TFS Team Project.

Setting TFS Permissions

There is an article that describes in detail how to set permissions for all the areas of TFS that require privileged access. You can also get to it through the TFS Administrative Tasks article which will show you a page of links to guidance for TFS Tasks. One of the links under the TFS Permissions Tasks section points to the Setting TFS Permissions article that provides instructions and documented steps for setting permissions for TFS, including Areas and Iterations, Builds, Drop Location, Reports, SharePoint Portal, Source Control, Test-Related access, and Work Items.

Checking-In Code

There is a great MSDN website that lists several Common Development Tasks and gives details on each one. The list of Developer Tasks includes: Find Work Items, Schedule Tasks, Get a local copy of files from the Version Control Server, Use labels, View Historical Data, Roll Back Submitted Changes, Debugging, Use IntelliTrace, Debug Transact-SQL, Write and Change Code, Code Change Impact on Tests, Use Unit Tests, Code Analysis Tools, Measure Complexity, Profiling Tools, Complete Dev Tasks, Shelve and Unshelve Pending Changes, Find a Shelveset, and so on.

At the Church, in ICS, the TFS server to connect to is called In Visual Studio 2010, you will want to connect to your TFS Team Project using Team Explorer. To open the Team Explorer window, click on the View tab, and then select Team Explorer. You can also open the Team Explorer window by pressing the keys Ctrl + W and then pressing M. When Team Explorer opens it will have a pane on the right-hand side of the display (see Figure 1).


Open Team Explorer in Visual Studio 2010 (Figure 1).

In the example above, the project that is displayed is the MSStack project. If your project is not listed when you open Team Explorer, you will need to click on the Connect to Team Project icon in the upper left-hand corner of the Team Explorer pane (see Figure 2).


Click on the "Connect to Team Project" icon (Figure 2).

When the Connect to Team Project icon is clicked, it will display a dialog similar to the one displayed in Figure 3. Only projects that you have rights to will be displayed.


Connect to a Team Project (Figure 3).

If no server is selected, then no projects will be displayed. To select a server, click on the Servers... button in the upper right-hand corner. In the Add/Remove Team Foundation Server dialog, click on the Add... button if no servers are displayed in the list (see Figure 4).


Add a TFS Server (Figure 4).

In the Add Team Foundation Server dialog that shows up, enter the ICS TFS Server that contains all Church projects in the Name or URL of Team Foundation Server: field, which is (see Figure 5). Then click on the OK button.


Type in the ICS TFS Server name (Figure 5).

That will display the Add/Remove Team Foundation Server dialog again and the ICS TFS Server should be highlighted. Click the Close button to set this as the default Team Foundation Server that will be used from now on. This will return focus to the Connect to Team Project dialog. The default Project Collection in the left pane will be upgradeFromICSTFS2008 and all projects in this collection that you have rights to will be displayed in the right pane. In the list of projects, select the check box(es) of the project(s) to which you would like to connect and be displayed in Team Explorer. To close the dialog and connect to the selected projects, click on the Connect button.

In the Solution Explorer, you can right click on the name of the Solution and select Add Solution to Source Control... and it will create a pending change to add all the files in the Solution to the Source Code hierarchy of your Team Project. You can then right click on the Solution in Solution Explorer (or the folder in Source Control Explorer) and select Check In... (or View Pending Changes).

Creating a Build Definition

There is an article available that describes how to create a Build Definition and set Versioning on a Build. It can also be found by going to the TFS Administrative Tasks article for TFS Tasks guidance, and selecting one of the links under the Team Project Tasks section that points to the article with instructions on Builds and Version Control.

Producing a New Build

The MSDN website has a great article that lists several Build Tasks and gives details on each one. The list of Build Tasks includes: Running a Build, Monitoring Build Progress, Receiving Emails Notices, and Stopping a Build. On the pages there are also links to "Manage and View Completed Builds" and "Administering Team Foundation Build."

Creating a Test Environment

There is an MSDN article that describes how to install and configure Visual Studio Agents and Controllers. There is a little trick to setting up a Test Controller in the lab on a Virtual Machine (VM). This and other handy bits are captured in the article located in the list of TFS 2010 Test Tools Information links. One of the TFS Test Tools internal links, under Running Tests, points to the article that provides information on Microsoft Test Manager Tips and Tricks.

Running Tests

There are several handy links regarding running tests located in the TFS 2010 Test Tools Info article. Two Running Tests sections under Internal Links and External Links in the TFS Test Tools article point to articles and webpages that provide information about running tests.

Publishing Test Results

There is a great MSDN website that gives details on "Running Automated Tests from the Command Line." The list of tasks that are covered include: "Saving Automated Test Results" and "Viewing Results from your Automated Test Runs." The following are links for these topics:

Viewing TFS Reports

MSDN has a great article that gives details on "Accessing a Team Project Portal and Process Guidance." The list of topics include: "Determining if your Team Project Portal is Enabled," "Determining if Process Guidance is Enabled," "Accessing Team Project Portal Sites," and "Accessing Process Guidance."

Generating TFS Reports

In the TFS Test Tools article, there is guidance on how to generate TFS Reports. One of the links under the Reporting section of Internal Links points to a video that provides instruction on creating TFS Reports using Excel. There is also an article that describes the same process. Another article describes how to create TFS Reports using Reporting Services (SSRS). There are also additional links pointing to external sites that are very useful when creating TFS Reports.

This page was last modified on 7 December 2012, at 15:16.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.