Error 'No agent could be found with the follow

2019-01-14 14:33发布

I'm setting up a new build server using TFS 2015 and after I configured the agent, when I tried to queue a build I got this error:

No agent could be found with the following capabilities: msbuild, visualstudio, vstest

How can this be resolved?

10条回答
孤傲高冷的网名
2楼-- · 2019-01-14 15:07

By default, when using the new build system on VSO, it doesn't pick the hosted build option, which is how I ended up on this post in Stack Overflow. If you are used to using a VSO build server here's what you need to do:

Create a hosted build by going to the General tab and changing your Default Queue to hosted. More on the restrictions of that and how it works here: https://www.visualstudio.com/get-started/build/hosted-agent-pool

查看更多
何必那么认真
3楼-- · 2019-01-14 15:07

I had this issue and it turned out being my release process had selected the "wrong" agent. Just edit the release and set the correct agent queue

enter image description here

查看更多
祖国的老花朵
4楼-- · 2019-01-14 15:07

You have to install the correspondent Visual Studio version on the build machine (where you have installed your agent). This will add the required tools and capabilities to the server.

Visual Studio is required, because it installs all the build targets required to build your projects.

After being installed, you have to restart the agent Windows service so that it refreshes the list of capabilities.

Since you are using the Visual Studio installation on the build machine to build, that installation doesn't count as an additional license.

查看更多
戒情不戒烟
5楼-- · 2019-01-14 15:07

General solution for TFS:

The common way of resolving most of the issues on the build server is to install Visual Studio & all dependent packages on your build server.

Alternative solution in case of using VSTS

When you choose where to build, use "Hosted" and then the build will work.

The guide how to make it work may be found here: Deploy an agent on Windows for TFS 2015

Check the agent section which will contain information about capabilities.

Updated:

Once you have the list of capabilities in vsts(azuredevops) you might need to install the desired software on your build agent machine.

PS Be aware, you might have to license your sw, if required.

查看更多
▲ chillily
6楼-- · 2019-01-14 15:08

I was using a Xcode build slave for building an Xcode project.

And the error message I ended up with in TFS 2015 was

"No agent could be found with the following capabilities: xcode"

I registered an OS X on-premise build slave.

In the "Register Agent" step, I named by build agent:

>> Register Agent:

Enter agent pool (press enter for default) > My-Xcode-Agent-Pool

So, I had to select the "My-Xcode-Agent-Pool" as Default queue in the build settings. Source: Microsoft-hosted agents

查看更多
趁早两清
7楼-- · 2019-01-14 15:14

In my case, after installing MSBuild (https://www.visualstudio.com/downloads/, search for "Build Tools for Visual Studio 2017"), I just had to add the path to MSBuild to the PATH environment variable. The agent wasn't detecting MSBuild until I did that.

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin

I did NOT have to install the full Visual Studio IDE. The selected answer for this question is just plain wrong...

查看更多
登录 后发表回答