VisualStudioTeamServices在Azure中构建服务器

VisualStudioTeamServices在Azure中构建服务器,azure,msbuild,azure-devops,vstest,Azure,Msbuild,Azure Devops,Vstest,我正在尝试为Azure中的Visual Studio团队服务创建自定义生成服务器。我已在虚拟机上安装了生成代理和Visual Studio Express,该虚拟机作为“默认”池中的生成代理运行并连接到我在visualstudio.com上的项目 但是,当我尝试运行生成时,出现以下错误: No agent found in pool 1 which satisfies the specified demands: msbuild visualstudio vstest Agent.Version

我正在尝试为Azure中的Visual Studio团队服务创建自定义生成服务器。我已在虚拟机上安装了生成代理和Visual Studio Express,该虚拟机作为“默认”池中的生成代理运行并连接到我在visualstudio.com上的项目

但是,当我尝试运行生成时,出现以下错误:

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
构建之后至少会运行,但在“测试程序集”步骤中,我遇到了另一个错误。我认为错误消息中最重要的部分是
无法确定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
文件夹中,我还尝试将此文件夹添加到系统
路径
,但这没有什么区别


如何在Azure中设置工作的生成代理?

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

Visual Studio Express没有测试工具。安装Visual Studio社区(假设您符合基于许可条款的社区资格)或您或您的组织获得许可的Visual Studio版本(专业版/企业版)。

,您只需说服生成计算机它确实安装了VS。从链接:

对我有效的是创建以下注册表项: HKEY\U LOCAL\U MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0

在该键中,创建一个名为string的新值 ShellFolder和值C:\Program Files(x86)\Microsoft Visual Studio 14.0

希望能有帮助


在测试程序集下的TFS生成日志中,我看到错误:

System.Management.Automation.CmdletInvocationException:无法确定vstest.console.exe的位置

我将VSTest设置为Visual Studio 2015,我正在使用VS/TFS2017,因此切换到最新版本解决了问题:


您安装了哪个版本的Visual Studio?2015年之前的一次?或者您是否安装了2015年的社区版?