Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connect VS code with TFS on mac

How to connect Visual Studio Code on mac with Team Foundation Server(TFS).

Or any other way to connect with tfs?

like image 731
Pritish Avatar asked May 25 '17 10:05

Pritish


People also ask

How do I connect Visual Studio code to TFS?

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.

How do I connect to Vscode terminal Mac?

Drag Visual Studio Code. app to the Applications folder, making it available in the macOS Launchpad. Open VS Code from the Applications folder, by double clicking the icon. Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing Options, Keep in Dock.


1 Answers

This are the steps to effectively connect a TFS (TFVC) Repository to your VS Code on Mac:

INSTALL THE SOFTWARE

  1. Install Visual Studio Code for Mac (currently here: https://code.visualstudio.com/download).
  2. Install the TFS extension for VS Code: Go to the Extensions tab in VS Code, Search for TFS and install.
  3. Install TEE-CLC. Follow this guide: https://www.youtube.com/watch?v=VPNaEIVZfr0&feature=youtu.be.

CREATE A LOCAL TFVC WORKSPACE IN YOUR MAC

Now you need to have a local TFVC Workspace on your machine. If you don't have one (as it was my case), you need to create it. The following steps are partially extracted from https://stackoverflow.com/a/21785438/2816119.

  1. Create a local folder where you are going to download and locally store the source code.
  2. Open a Terminal window.

  3. Create a local workspace from your terminal window with the following command:

    tf workspace -new MyWorkspace -collection:<<<http://full.URL.of/your/repository>>>
    
  4. Map your repository folder to your local folder with the following command:

    tf workfold -map '$/your/repository/folder/path' /your/local/folder/path -collection:<<<http://full.URL.of/your/repository>>> -workspace:MyWorkspace
    
  5. If everything went well, you'll see a new sub-folder ".tf" in your local folder.

  6. Open your local folder with VS Code. If everything went well you'll se after a few seconds the TFVC icons in the bottom bar: enter image description here

GET THE SOURCE CODE

To get the source code you'll need to go to the Source Control Tab -> Ellipsis (...) button -> Sync.

enter image description here

Once you press it you'll see a progress bar moving in the Source Control Tab and you'll see how the source code is downloaded to your local folder.

ENJOY

Now you can use your TFVC repository as described in their guides. If something is not clear or you have questions please let me know. I'll try to help you :-)

like image 102
juangalf Avatar answered Sep 27 '22 19:09

juangalf