无法确定 TFS 构建服务器上的源代码管理服务器

Unable to determine the source control server on TFS build server

如何在tfs 2013构建服务器上使用TF history命令行?

当我尝试调用命令行时 tf history C:\Builds\MyProj\MyBuild\src\Dev 在 tfs 构建服务器上,我得到:

There is no working folder mapping for "C:\Builds\MyProj\MyBuild\src\Dev`

当我在 tfs 2013 构建服务器上尝试 powershell Get-TfsItemHistory C:\Builds\MyProj\MyBuild\src\Dev 时,我得到:

Unable to determine the source control server.

当我在构建服务器和团队资源管理器中打开 visual studio 时,我尝试配置到文件夹的工作区映射,我得到:

"The working folder C:\Builds\MyProj\MyBuild\src\Dev is already in use by the workspace 10_1_MHATFSBLD01;MHABLDSvc on computer MHATFSBLD01."

*MHA 是团队项目集合的名称

关于"no working folder error",您需要设置服务器:

 $tfs = get-tfsserver "http://server:8080/tfs/collection"
 Get-TfsItemHistory '$/YourTeamProject/MyProj/src/Dev' -Server $tfs

显然,您需要针对您的特定 TFS 源结构进行调整。

关于构建无法识别 TFS cmdlet 的问题,请在构建代理的 Windows PowerShell x86 命令提示符中尝试您的命令。如果仍然失败,您需要安装 TFS cmdlet and/or 将 PowerShell 修复为 运行 在 32 位模式下。参见