This documentation is archived and is not being maintained.

Set Up Team Foundation Server for Version Control

Visual Studio 2012

The first part of our tutorial starts with Julia, who performs development tasks on the Fabrikam team. She installs Team Foundation Server (TFS), creates the team project, adds her team members to the project, and places the project's code under version control so her team can get the code from TFS to start their work.


In this topic

  1. Install Team Foundation Server

  2. Create the Team Project

  3. Add Members to the Team Project

  4. Add Source Code to Version Control

Julia starts by installing the basic configuration of TFS on her team's server (ALMSVR), which is running a 64-bit edition of Windows Server 2008 R2. When the installation screen appears, she clicks the link to install TFS. In the Configuration Center, she runs the Basic wizard and keeps all the default options. She can add features later, if she needs to.

To follow the tutorial for your project, download and install Visual Studio Team Foundation Server 2012. See Installing Team Foundation Server and Visual Studio ALM.

Julia creates a team project named FabrikamFiber so her team can manage and build the project's code, organize tests, and track work and bugs in TFS. She starts Visual Studio, opens Team Explorer, and then connects to the instance of TFS she just installed (http://almsvr:8080/tfs).

Connect to Team Foundation Server
Tip Tip

Skip step 3-5 if you're running Visual Studio on the same machine where you installed TFS. Visual Studio will recognize that server automatically.

  1. Open or choose Team Explorer.

  2. Under Home, choose Connect to Team Foundation Server.

  3. In Connect to Team Project, choose Servers.

  4. In Add/Remove Team Foundation Server, choose Add to open Add Team Foundation Server.

  5. For Name or URL of Team Foundation Server, specify your server's name (Julia's server is ALMSVR), choose OK, Close.

  6. After Connect to Team Foundation Server appears, open the Select a Team Foundation Server list, choose the server that you just added, and Connect.

Select Team Explorer, Create a New Team Project
  1. In Team Explorer, choose Create a New Team Project, which runs the New Team Project wizard.

  2. On Specify the Team Project Settings, enter the team project's name and description.

  3. On Select a Process Template, choose a process template to create your team project.

    Julia chooses the Microsoft Visual Studio Scrum 2.0 process template because it's simple. See Choose a Process Template.

  4. To skip the rest, choose Finish.

    Note Note

    When you create a team project for code that is already under version control, you can continue to the next step and associate the new team project with a new branch of code. In this case, the new branch is not yet in version control as part of another team project. This code will be added to Team Foundation version control for the first time in this team project.

See Create a Team Project.

Julia now adds her team members to the team project. She uses Team Web Access (http://almsvr:8080/tfs) to add each member to My Team. Julie also sends Annie, the team's product owner, the link to the team page (http://almsvr:8080/tfs/FabrikamFiber/My%20Team) so that Annie can start to create the backlog.

Add members to My Team
  1. On Team Web Access home page (http://almsvr:8080/tfs), choose the team project. (Julia's team project is FabrikamFiber.)

  2. Under MEMBERS, choose Manage members.

  3. On MANAGE MEMBERS OF FABRIKAMFIBER TEAM, open the Add list, and choose Add windows user or group.

  4. In ADD A WINDOWS USER OR GROUP, enter the alias (DOMAIN\alias) of each team member.

Julia keeps the project code in the c:\code\almsvr-ff\Main\ folder. She uploads this folder to the $/FabrikamFiber/Main/ folder in the version control repository. She then sends email to the team to tell them they can now get the code from TFS. The team connects to the FabrikamFiber team project and downloads the code to their development computers to start work.

Note Note

If your team works on multiple releases at the same time, you can create a branch for each release. In larger organizations, you can create a branch for each feature so that teams can work in relative isolation and integrate with each other in an organized way.

Julia uploads the solution to version control
  1. Open or choose Team Explorer.

  2. Under Pending Changes, choose Source Control Explorer.

  3. Near the top of Source Control Explorer, choose Not mapped to specify the local path.

  4. In Map, enter the full path of the folder on your computer that contains the project code, and choose Map.

  5. In Solution Explorer, open the solution's top-level shortcut menu, and choose Add Solution to Source Control.

  6. In Team Explorer, choose Pending Changes.

  7. Under Comment, enter your comment, and choose Check In.

  1. Connect to the team project.

  2. Open Source Control Explorer.

  3. Map the root folder of the version control repository to the folder on the local computer where you want to keep the code.

  4. In Source Control Explorer, open the project's shortcut menu, and choose Get Latest Version.

See Using Version Control.