2016-07-15 142 views
2

我正在尝试为Azure中的Visual Studio Team Services创建一个自定义构建服务器。我在正在运行的虚拟机上安装了构建代理和Visual Studio Express,并在VisualStudio.com上将其作为“默认”池中的构建代理连接到我的项目。Visual Studio Team Services在Azure中构建服务器

然而,当我试图运行构建,我得到了以下错误:

No agent found in pool 1 which satisfies the specified demands: 
msbuild 
visualstudio 
vstest 
Agent.Version -gtVersion 1.98.1 

的MSBuild已经在能力上visualstudio.com而不是其他两个,所以我通过C:\Program Files (x86),并添加挖名单这两个功能列表:

vstest: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow 
visualstudio: C:\Program Files (x86)\Microsoft Visual Studio 14.0 

构建然后运行至少,但我在“测试组件”的步骤得到另一个错误。我认为错误消息的最重要的部分是Unable to determine the location of vstest.console.exe,在这里它是在充分反正:

System.Management.Automation.CmdletInvocationException: Unable to determine the location of vstest.console.exe ---> System.IO.FileNotFoundException: Unable to determine the location of vstest.console.exe 
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeVSTestCmdlet.GetVsTestLocation() 
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeVSTestCmdlet.ProcessRecord() 
at System.Management.Automation.CommandProcessor.ProcessRecord() 
--- End of inner exception stack trace --- 
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) 
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) 
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) 
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) 
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) 
at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes) 
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource) 

我已经看过并vstest.console.exe位于我上面指定的文件夹vstest,我也试着加入该文件夹到系统PATH但这没有什么区别。

如何在Azure中设置可用的构建代理?

+0

您安装了哪个版本的Visual Studio? VS 2015之前?或者你安装了2015年的社区版吗? –

回答

1

Visual Studio Express没有测试工具。根据授权条款安装Visual Studio社区(假设您符合社区的要求),或您或您的组织获得许可的Visual Studio版本(专业/企业版)。

0

您需要在构建服务器上安装Visual Studio。此时,构建代理将识别可用的功能,如msbuild, visualstudio, and vstest

0

I found a solution,你只需说服你的生成机器,它实际上已经安装了VS。从链接:

What worked for me was to create the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0

and within that key, create a new value of type string with name ShellFolder and value C:\Program Files (x86)\Microsoft Visual Studio 14.0.

Hope it helps

1

在TFS构建下测试组件的日志我看到的错误:

System.Management.Automation.CmdletInvocationException: Unable to determine the location of vstest.console.exe

我VSTest设置的Visual Studio 2015年,我用VS/TFS2017所以切换到最新解决了问题:

enter image description here

相关问题