【问题标题】:Setup VSTS in VSCode在 VSCode 中设置 VSTS
【发布时间】:2018-04-23 10:24:46
【问题描述】:

我最近下载了 VSCode 以在我的 Mac 上使用。我安装了 TFS 插件,但没有一个教程在连接方面起作用。这是我关注的guide

如果我转到源代码控制,然后单击“...”,我没有获得 VSTS 的选项,我只有一个添加其他 SCM 提供程序的选项。如果我点击它,它会显示一个包含插件的列表,我已经下载,说明已安装。

我什至尝试从 VSTS 门户下载一个 Zip 分支并在 VSCode 中打开它,但它没有提示我连接到 VSTS。

我也尝试手动设置设置并添加了这些设置,但无济于事。

{
    "team.remoteUrl": "https://***.visualstudio.com",
    "tfvc.location": "/Users/***/Documents/TFS",
}

更新

我按照Gist 安装了 TFVS。 我已将用户设置更改为

{
    "tfvc.location": "/usr/local/Cellar/tee-clc/14.123.1/libexec/tf",
}

不幸的是,我在运行team signin 时仍然无法登录,因为我收到了错误

没有 Team Services 或 Team Foundation Server 存储库配置 被找到。确保您已打开一个包含存储库的文件夹。

TF 输出

Last login: Sun Apr 22 11:43:20 on ttys000
/usr/local/Cellar/tee-clc/14.123.1/libexec/tf ; exit;
MacBook-Pro:~ ***$ /usr/local/Cellar/tee-clc/14.123.1/libexec/tf ; exit;
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...6 completed.

[Process completed]

【问题讨论】:

  • 你解决了这个问题吗?

标签: macos visual-studio-code azure-devops


【解决方案1】:

首先,您需要 tf.exe 的完整路径,例如 Visual Studio 2017。

"tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\Tf.exe"

然后您需要按ctrl + shift + p 并搜索Team: signin 您将被要求选择您的登录体验选择.... (new experience)

然后会出现一个代码,只需复制它并按enter,您的浏览器将打开一个页面,要求您输入代码,然后您将使用您的vsts 帐户登录,就是这样!

【讨论】:

  • 谢谢!当我这样做时,我得到No Team Services or Team Foundation Server repository configuration was found. Ensure you've opened a folder that contains a repository. - P.s。用更多信息更新了我的问题
  • 确保 tfvc.location 路径存在(如果您安装了 Visual Studio 2017,则提供的路径)如果不确保下载 Team explorer every where 并指向您需要的可执行文件 from here CLC一个
  • 你能成功运行tf 命令吗?输出是什么
  • 嘿,谢谢你的帮助,如果我只运行tf,我会得到我在编辑问题中输入的输出。
【解决方案2】:

您需要通过TF命令(您提供的文章中的创建工作区和结帐部分)或TEE UI(eclipse)将文件映射到本地机器,然后您可以打开该文件夹并连接到VSTS .

类似线程:Setting up TFVC repo in Visual Studio Code for Mac

【讨论】:

    猜你喜欢
    • 2022-11-30
    • 1970-01-01
    • 2021-10-28
    • 2019-11-08
    • 1970-01-01
    • 2018-03-16
    • 2020-06-18
    • 2021-10-18
    • 1970-01-01
    相关资源
    最近更新 更多