从进程返回退出代码 100 - 从 TFS 获取源代码时出错

Exit code 100 returned from process - error when getting source from TFS

我们在从 TFS 获取源代码时间歇性地收到此错误:

2017-03-23T23:49:31.0591599Z ##[section]Starting: Build solution [SOLUTION-NAME].sln
2017-03-23T23:49:31.0591599Z ==============================================================================
2017-03-23T23:49:31.0591599Z Task         : Visual Studio Build
2017-03-23T23:49:31.0591599Z Description  : Build with MSBuild and set the Visual Studio version property
2017-03-23T23:49:31.0591599Z Version      : 1.113.0
2017-03-23T23:49:31.0591599Z Author       : Microsoft Corporation
2017-03-23T23:49:31.0591599Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613727)
2017-03-23T23:49:31.0591599Z ==============================================================================
2017-03-23T23:49:31.6529233Z Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
2017-03-23T23:49:31.8872843Z ##[error]Exit code 100 returned from process: file name 'tf', arguments 'vc resolvePath "$\My Development\Trunk\src\Rostering\trunk\[SOLUTION-NAME].sln" /loginType:OAuth /login:.,******** /noprompt'.

知道导致此问题的原因吗?当发生这种情况时,我们看不到明确的模式。我们的构建服务器全天候运行 24/7。它似乎更有可能发生在当天的第一个构建中。

问题可能与工作区有关,您可以尝试解决方案Error When Setting Clean = True on Windows

Looks like scorch is failing when the root sources folder (e.g. _work\s) is not mapped - i.e. workspace does not contain a root mapping. One not great workaround is to set a variable build.clean to all.

为根目录创建一个映射为 $/projectroot/* 并将本地路径字段留空。这只会将项目根目录下的单级文件夹下载为空。这是一个解决方法。

在您的 tfs 构建代理上,您可以删除 $/{agentfolder}/_work/SourceRootMapping 上的缓存文件。当我更改集合的构建服务器时,它发生在我身上。