Use Team Foundation Version Control(TFVC) at Visual Studio Code

2017/07/052 min read
bookmark this
Responsive image
  • Install Visual Studio Team Services Extensions from Visual Studio Code Marketplace.

  • Add TF Command line to Visual Studio Code

    • VSC - File - Preferences - Settings

Depend on what's Visual Studio you installed on the machine, visual studio code's TFVC location will be different, following is an example for vs2015 and vs2017 for your reference.

// example tf.exe location for visual studio 2015
{
    "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\tf.exe",
    "tfvc.restrictWorkspace": true
}
// example tf.exe location for visual studio 2017
{
    "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\tf.exe",
    "tfvc.restrictWorkspace": true
}
- Put your own setting depend on what Visual Studio you installed.

Login to your visual studio online and get Access Tokens from VSTS.

- Click Security and go to Personal access tokens and click add a new

token.Also, Make sure you copy the token now. We don't store it and you won't be able to see it again.

Open Visual Studio code and add token

- Click the Team, put the token and click enter.

- ![](https://d1p0mp3f1fx0hz.cloudfront.net/_hqw9100fv.png)

Now, you should be able to connect to visual studio team service from visual studio code, including check-in, get the latest file check bug items.

  1. TFVC Quickstart

  2. Visual studio code TFVC support

  3. How to add TF command to Visual Studio Code

  4. Video - Setup Team Services extensions for Visual Studio Code

  5. Visual Studio Team Services Extension for Visual Studio Code