Team Foundation Server
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.
TFS Settings
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:
Option | Description |
---|---|
URL | Enter the URL to your Visual Studio Online projects TFS path of the following format |
Root | Define project root as |
Username and Password | Enter your Microsoft Account credentials or use the alternate credentials created earlier, where the username must be prefixed with |
For step-by-step instructions, see the related blog-post.