azure - Azure 中的 Visual Studio Team Services 构建服务器

标签 azure msbuild azure-devops vstest

我正在尝试为 Azure 中的 Visual Studio Team Services 创建自定义生成服务器。我已在虚拟机上安装了生成代理和 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 文件夹中,我还尝试将此文件夹添加到系统 PATH 但这没有什么区别。

如何在 Azure 中设置有效的构建代理?

最佳答案

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

关于azure - Azure 中的 Visual Studio Team Services 构建服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38393980/

相关文章:

c# - 如何在本地测试 Azure Functions 身份验证

azure - 将数据从 Excel 导出到 Azure

unit-testing - CruiseControl 不合并来自 MSTest 的测试结果

Azure EventHub 事件格式

c# - Azure AD B2C 自定义策略,保护 API 连接器

c# - 为什么我要在 MSBuild 可用时继续使用 Nant?

c# - 在使用 MSBuild 发布之前执行 web.config 转换

azure - Azure DevOps 部署 WebApp 任务中的应用程序设置和配置设置有什么区别?

azure - 我想使用 Azure 管道任务发送带有附件的电子邮件

git - 如何将 tfvc 迁移到 Git(包括历史记录)