This page contains descriptions of the fields and options available when setting up a VCS Root to connect to Microsoft Team Foundation Server Version Control. When connecting to a TFS-hosted Git repository, select Git (JetBrains) as Type of VCS.
note
TFS integration is only supported for Windows machines. It is also required to have Team Explorer installed and correctly functioning on the TeamCity server. If you want to use the VCS Checkout Mode, Team Explorer should also be installed on all the agents which will run the related builds. See this Supported Platforms and Environments for the supported versions.
Option
Description
Team Foundation Server Url
Team Foundation Server URL in the following format:
http[s]://<server>:<port>
Starting with TFS 2010, the URL can also include sub-path:
http[s]://<server>:<port>/<path>
User Name
Specify a user to access Team Foundation Server. This can be a user name or DOMAIN\UserName string. Use blank to let TFS select a user account that is used to run the TeamCity Server (or Agent for the agent-side checkout)
Password
Enter the password of the user entered above.
Root
Specify the root using the following format:
$<project name><project catalogue>
Agent-Side Checkout
The VCS Checkout Mode checkout is only supported on Windows agent machine (for Linux and Mac agent you can use the VCS Checkout Mode). It is also required to have Team Explorer installed on the agent machine.
TeamCity automatically creates a TFS workspace for each Build Checkout Directory used. The workspace is created on behalf of the user account specified in the VCS root settings.
The created TFS workspaces are automatically removed after a two-week idle time.
TFS does not allow several workspaces on a machine mapped to the same directory. TeamCity TFS agent-side checkout may attempt to remove intersecting workspaces to create a new workspace that matches the specified VCS root and checkout rules. Note, it is unable to remove workspaces created by another user.
Hosted TFS Login
Do the following:
Install Team Explorer (or Visual Studio) with the most recent updates to the TeamCity server and build agents.
Log in to the TFS web site, go to the user profile| CREDENTIALS, click Enable alternate credentials and set password and specify credentials and a password.
In the TeamCity VCS settings:
Use the following URL format: https://yourusername.visualstudio.com/DefaultCollection
use the TFS credentials and password. The username format is ##LIVE##\<YOUR LOGIN>.