Visual Studio Team Services - 构建失败,定义错误?

时间:2016-03-07 10:59:38

标签: visual-studio build azure-devops build-definition

我已经在项目上工作了一段时间,现在我想使用Visual Studio Team Services。在本地,Visual Studio中的建筑物没有出错,应用程序按预期工作 我已将此工作代码签入VSTS,因此它在回购中并且很有用。
现在我想建立它。我用没有改变创建了一个新的Build定义。当我运行构建时它失败了。我尝试编辑构建定义,但凭借我对此的经验,我只会搞砸更多并创建更多错误。

我的问题:显然,它想要找到C:\ a \ 1 \ s但是我不知道为什么以及如何找到这条路径。 我需要在构建定义中更改什么?我是新手,所以我不知道所有设置的作用以及所需文件的位置。
我尝试将项目文件夹中的.sln文件添加到构建定义中(如第二张图片所示),但它仍然希望找到那种奇怪的路径。

以下是构建定义,出错的步骤以及日志中的错误。

With settings unchanged

NuGet恢复***。sln

2016-03-07T10:28:15.8302718Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetInstaller\0.1.18     
2016-03-07T10:28:15.9337363Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1     
2016-03-07T10:28:16.5636975Z ##[error]Could not find a part of the path 'C:\a\1\s'.     
2016-03-07T10:28:16.5876990Z ##[error]No solution was found using search pattern 'C:\a\1\s\**\*.sln'.

将文件复制到:$(build.artifactstagingdirectory)

2016-03-07T10:28:16.6827013Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11     
2016-03-07T10:28:17.1800860Z ##[debug]check path : C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\task.json     
2016-03-07T10:28:17.1810857Z ##[debug]set resource file to: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\task.json     
2016-03-07T10:28:17.1810857Z ##[debug]system.culture=en-US     
2016-03-07T10:28:17.1820859Z ##[debug]load strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\task.json     
2016-03-07T10:28:17.1820859Z ##[debug]load loc strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\strings\resources.resjson\en-US\resources.resjson     
2016-03-07T10:28:17.1820859Z ##[debug]Contents=**\bin\release\**     
2016-03-07T10:28:17.1830859Z ##[debug]SourceFolder=C:\a\1\s     
2016-03-07T10:28:17.1830859Z ##[debug]check path : C:\a\1\s     
2016-03-07T10:28:17.1840858Z ##[debug]load strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\node_modules\vsts-task-lib\lib.json     
2016-03-07T10:28:17.1840858Z ##[debug]load loc strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\node_modules\vsts-task-lib\strings\resources.resjson\en-US\resources.resjson     
2016-03-07T10:28:17.1850860Z Not found SourceFolder: C:\a\1\s     
2016-03-07T10:28:17.1860857Z ##[debug]task result: Failed 

Build definition with solution defined

NuGet恢复$ /测试项目/ QRM / QRM.sln

2016-03-07T10:47:46.0629142Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetInstaller\0.1.18     
2016-03-07T10:47:46.1969152Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetInstaller\0.1.18\NuGetInstaller.ps1     
2016-03-07T10:47:46.8519190Z ##[error]Cannot find path 'C:\a\1\s\QRM\QRM.sln' because it does not exist.     
2016-03-07T10:47:46.8639180Z C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\tools\NuGet.exe restore "C:\a\1\s\QRM\QRM.sln"  -NonInteractive     
2016-03-07T10:47:48.8829320Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.     
2016-03-07T10:47:48.8999324Z ##[error]Could not find a part of the path 'C:\a\1\s\QRM\QRM.sln'.     
2016-03-07T10:47:48.9249320Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe

将文件复制到:$(build.artifactstagingdirectory)

2016-03-07T10:47:49.0239330Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11     
2016-03-07T10:47:49.6659427Z ##[debug]check path : C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\task.json     
2016-03-07T10:47:49.6779370Z Not found SourceFolder: C:\a\1\s     
2016-03-07T10:47:49.6789372Z ##[debug]set resource file to: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\task.json     
2016-03-07T10:47:49.6799369Z ##[debug]system.culture=en-US     
2016-03-07T10:47:49.6799369Z ##[debug]load strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\task.json     
2016-03-07T10:47:49.6809368Z ##[debug]load loc strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\strings\resources.resjson\en-US\resources.resjson     
2016-03-07T10:47:49.6809368Z ##[debug]Contents=**\bin\release\**     
2016-03-07T10:47:49.6809368Z ##[debug]SourceFolder=C:\a\1\s     
2016-03-07T10:47:49.6819369Z ##[debug]check path : C:\a\1\s     
2016-03-07T10:47:49.6819369Z ##[debug]load strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\node_modules\vsts-task-lib\lib.json     
2016-03-07T10:47:49.6829365Z ##[debug]load loc strings from: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\CopyFiles\1.0.11\node_modules\vsts-task-lib\strings\resources.resjson\en-US\resources.resjson     
2016-03-07T10:47:49.6829365Z ##[debug]task result: Failed

修改
构建定义的存储库选项卡: Build definition repository tab

存储库结构: Repository structure

2 个答案:

答案 0 :(得分:2)

当您为新版本排队时,您是否输入了源版本?我在日志中看到版本3,但实际上没有文件传输。如果您要获取特定的变更集,则需要输入C3而不是3。但是我建议把盒子留空。

enter image description here

答案 1 :(得分:2)

根据您提供的日志:

2016-03-07T15:00:44.4590685Z Done syncing repository Test project to version 3 (workspace version -1)

此问题可能是由您的构建帐户的访问权限引起的。请检查并确保构建代理程序使用的帐户具有访问代码存储库的权限。

相同的问题供您参考:

TFS 2105 build issue

TFS 2015 Build Agent failing syncing the repository