问题描述
我是 VS 代码的新手.到目前为止,它看起来非常好,而且比 VS 轻得多.我如何将我现有的 TFS 服务器连接到 VS 代码(我的 TFS 必须留在本地 - 公司要求).我读到这是可以做到的,但到目前为止我只看到了 Git 或 TFVC 的例子.
正如 Daniel 所说Git 和 TFVC 是 TFS 中的两个源代码控制选项
".幸运的是,目前 VS Code 都支持两者.
您需要安装
I'm new to VS code. So far it seems very nice and much lighter than VS.How could I connect my existing TFS server to VS code (my TFS must stay on premises - company requirements).I read that this can be done but so far I've seen only examples for Git or TFVC.
Just as Daniel said "Git and TFVC are the two source control options in TFS
". Fortunately both are supported for now in VS Code.
You need to install the Azure Repos Extension for Visual Studio Code.The process of installing is pretty straight forward.
- Search for Azure Repos 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 }
Open a local folder (repository), From View -> Command Pallette ..., type team signin
Provide user name --> Enter --> Provide password to connect to TFS.
Please refer to below links for more details:
- Using Visual Studio Code & Team Foundation Version Control(TFVC)
- Team Foundation Version Control (TFVC) Support
- Using Version Control in VS Code
Note that Server Workspaces are not supported:
这篇关于如何在 Visual Studio 代码中连接 TFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!