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. Common VCS Root properties are described here.
When connecting to a Visual Studio Online Git repository, select Git as Type of VCS.
note
It is required to have Team Explorer installed and correctly functioning on the TeamCity server. After installing Team Explorer, the TeamCity server restart is required. When detecting Team Explorer version, TeamCity checks the following paths:- Windows x86: %\CommonProgramFiles%\Microsoft Shared\Team Foundation Server\%\version_number%- Windows x64: %CommonProgramFiles(x86)%\Microsoft Shared\Team Foundation Server\%\version_number%
If you want to use the agent-side checkout mode, Team Explorer should also be installed on all the agents which will run the related builds. See this section for the supported versions.
TeamCity 9.x supports TFS integration for Windows machines only. TeamCity 10 features the cross-platform TFS integration, and the EAP version compatible with TeamCity 9.x is already available for download as a separate plugin, which can be installed manually.
TFS Settings
Option
Description
URL
Team Foundation Server URL in the following format:
Specify the root using the following format: $<project name><project catalogue>
UserName
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.
Agent-Side Checkout
The agent-side checkout is only supported on Windows agent machine (for Linux and Mac agent you can use the server-side checkout). It is also required to have Team Explorer installed on the agent machine.
TeamCity automatically creates a TFS workspace for each 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 that it is unable to remove workspaces created by another user.
Option
Description
Enforce overwrite all files
When the option is enabled, TeamCity will call TFS to update workspace rewriting all files.
Normally, there is no need to do forced update for every build. But, if you suspect that TeamCity is not getting the latest version from the repository, you can use this option.
Visual Studio Online
When configuring a VCS Root for a project hosted on Visual Studio Online, you have to enable alternate credentials support in your Visual Studio Online account.
Enabling Alternate Credentials
Applications that work outside the browser, such as the git client or the command-line TFS client, require basic authentication credentials to work. You can edit the VSO profile to set a secondary username that can be used in this case.
After navigating to your VSO account portal, use the menu at the top-right to edit your profile. The Credentials tab allows enabling alternate credentials. After clicking Enable alternate credentials, set a secondary username and password to use when configuring a VCS Root.
Connecting to Visual Studio Online TFVC
Configure the TFS Settings of the TeamCity VCS root: