Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
588 views
in Technique[技术] by (71.8m points)

macos - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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 :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...