TFS 从外部执行 tfs get 时无法指定工作区

TFS Could not specify workspace when executing tfs get from the outside

我正在从位置 E:\app\

执行此命令

TFS.exe get "C:\Repo\" /recursive /noprompt /overwrite

为了将最新的更改从 tfs 加载到 C:\Repo\

中的工作区

并且无法确定工作空间

Could not specify workspace. This can be improved by using the "tf workspaces /collection: TeamProjectCollectionUrl" command.

不幸的是,即使使用这个建议的命令我也无法让它工作

C:\Repo\>TF.exe workspaces /collection:url/Collection
Collection: http://url:8080/Collection
Workspace   Owner          PC   Comment
-------------- ------------------- ---------- -------------------------------------------------------------------------
USER-PC     USER USER      USER-PC

您需要将 C:\Repo 映射到来自位置 E:\app 的 运行 命令 tf get C:\Repo 之前的项目。例如,我将 $/CMMIProject 映射到本地文件夹 D:\Workspace\TFS2018\CMMIProject:

然后下面的命令将起作用:

C:\Program Files (x86)\Microsoft Visual Studio 14.0>tf get D:\Workspace\TFS2018\CMMIProject