Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCODE and TFVC how to connect?

How to connect TFVC (version control) to Visual Studio Code? Interested in basic operations such as checkin, checkout, resolve.

like image 780
Gleb Svechnikov Avatar asked Jul 01 '15 14:07

Gleb Svechnikov


People also ask

Can I use TFS with VS Code?

To go to TFS source control in your visual studio code, you can use the press Ctrl + Shift + G or click this icon in your left pane. Let's see how to use TFS commands in Visual studio code in out next blog (Part-2) And as always, feel free to reach me out if you have any questions.

How do I open team Explorer code in Visual Studio?

If you open Visual Studio and the Team Explorer pane doesn't appear, choose the View>Team Explorer menu option from the tool bar. From the Connect page, you can select the projects you want to connect to and quickly switch connection to a different project and or repository.


2 Answers

Microsoft recently released Visual Studio Team Services Extension for Visual Studio Code.

The process of installing is pretty straight forward:

  • Search for Visual Studio Team Services in VS Code and select to install the one by Microsoft
  • Open File -> Preferences -> Settings
  • Add the following lines to your user settings

If you have VS 2015 installed on your machine, your path to Team Foundation tool (tf.exe) may look like this:

{
    "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\tf.exe",
    "tfvc.restrictWorkspace": true
}

Or for VS 2017:

{
    "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\tf.exe",
    "tfvc.restrictWorkspace": true
}
  • From View -> Command Pallette ..., type team signin

  • In this step, you need to provide a personal access token.

  • If you already have VSTS account, go to VSTS online website. Under your name (top right corner of the screen), click Security, then click Add and then Create Token Copy and paste the generated token to VS Code

Hope it helps.

like image 146
Babak Avatar answered Sep 24 '22 03:09

Babak


Visual Studio Code supports Git, not TFS. If you have a TFS-hosted Git repo, you can connect to it the same way you'd connect to any Git repository. If you're using TFVC for source control instead of Git, you won't have integrated source control. You can still use the Team Explorer Everywhere cross-platform CLI to perform source control operations against TFS, but you won't have an integrated experience.

like image 43
Daniel Mann Avatar answered Sep 26 '22 03:09

Daniel Mann