TeamCity+;VSTS-无法对已存在的代理目标文件执行签出

TeamCity+;VSTS-无法对已存在的代理目标文件执行签出,teamcity,Teamcity,我正在尝试配置基于VisualStudioTeamServices的TeamCity构建,出现以下错误 我可以看到文件已下载到签出目录(C:\TeamCity\buildAgent\work\e3b96b8eb42644db),因此我可以找出发生这种情况的原因 [18:04:51]Starting the build on the agent MYAGENT [18:04:54]Clearing temporary directory: C:\TeamCity\buildAgent\temp\b

我正在尝试配置基于VisualStudioTeamServices的TeamCity构建,出现以下错误

我可以看到文件已下载到签出目录(C:\TeamCity\buildAgent\work\e3b96b8eb42644db),因此我可以找出发生这种情况的原因

[18:04:51]Starting the build on the agent MYAGENT
[18:04:54]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[18:04:54]Publishing internal artifacts
[18:04:54][Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[18:04:54][Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[18:04:54]Using vcs information from agent file: e3b96b8eb42644db.xml
[18:04:54]Checkout directory: C:\TeamCity\buildAgent\work\e3b96b8eb42644db
[18:04:54]Updating sources: auto checkout (on agent) (32s)
[18:04:54][Updating sources] Will use agent side checkout
[18:04:54][Updating sources] VCS Root: tfs: https://myproject.visualstudio.com/ $/myproject Project (32s)
[18:04:54][VCS Root: tfs: https://myproject.visualstudio.com/ $/myproject Project] revision: 26497
[18:04:55][VCS Root: tfs: https://myproject.visualstudio.com/ $/myproject Project] Using java working mode
[18:04:55][VCS Root: tfs: https://myproject.visualstudio.com/ $/myproject Project] Receiving workspace (10s)
[18:05:05][Receiving workspace] Using workspace TeamCity-checkout-9755e46c9dbd4e2386cd6ff8f61f9c3f;2805f05d-0506-40bf-ace2-1cc59462cfac/MYAGENT
[18:05:05][VCS Root: tfs: https://myproject.visualstudio.com/ $/myproject Project] Updating sources to revision: 26497
[18:05:27][Updating sources] Failed to perform checkout on agent: Failed to checkout repository version 26497: com.microsoft.tfs.core.clients.versioncontrol.exceptions.VersionControlException: java.lang.IllegalArgumentException: renaming: target file already exists

有什么提示吗?

安装Visual Studio后,问题消失了

我之所以安装它,是因为我在日志中找到了以下信息:

C:\TeamCity\buildAgent\plugins\tfs-agent\bin\tfs-native.exe @@C:\TeamCity\buildAgent\temp\globalTmp\TC-TFS-595-4405_66\command.params, in file: {/CheckApi} has failed with exit code 1: No TFS assemblies were found on the system. Please make sure you have Microsoft Team Explorer installed. Supported versions: 2017 2015 2013 2012 2010 2008 2005 
[2017-01-09 17:53:25,670]   INFO - cs.tfs.TfsAgentServiceProvider - Use Java TFS SDK 
[2017-01-09 17:53:25,671]   INFO - s.tfs.TfsUpdateByCheckoutRules - Clean checkout flag was set by the build agent 
[2017-01-09 17:53:31,714]   INFO - .tfs.java.TfsJavaConsoleRunner - TFS java console command has finished: ListWorkspaces -s="https://myproject.visualstudio.com/" -u="*******" -p="*******" -inputFile=C:\TeamCity\buildAgent\temp\globalTmp\TC-TFS-595-4405_67.tmp -outputFile=C:\TeamCity\buildAgent\temp\globalTmp\TC-TFS-595-4405_68.tmp, completed in 5.998 second(s) 
[2017-01-09 17:53:31,717]   INFO - s.vcs.tfs.TfsWorkspaceProvider - Using workspace TeamCity-checkout-9ee0800418e64e77b38b598f7d5b15a5;2805f05d-0506-40bf-ace2-1cc59462cfac/MYAGENT 
[2017-01-09 17:55:21,600]   INFO - ldServer.AGENT.PollingProtocol - New command is received from server "agentFileManager
我相信这与JavaTFSSDK有关。
我知道installvs并不是最优雅的解决方案,特别是对于构建服务器。如果您有任何其他想法,请分享。

如果您在项目中修改了文件,通常会发生这种情况。因此,TFS无法自动覆盖更改的文件。尝试签入挂起的更改或清理文件夹。

它似乎是代理存储库中的已修改文件。就像编译过程中生成的文件一样。您可以尝试执行干净的签出,或者转到代理,检查是否有任何挂起的更改。