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:25

What ended up working for me was to go to where I downloaded the agent and running:

./config.cmd remove then ./config.cmd to reinstall the agent from the command line inside the directory of my agent.

Download agent

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-01-14 15:29

Note: First of all, you can do all this with the community edition and TFS Express 2015 on your own server (for free up to five users) - so don't worry about needing to use the Visual Studio online version or paying for Visual Studio Professional.


It is very easy to misinterpret the error message provided and go off on a wild-goose chase trying to debug it.

Unfortunately the message itself is just badly worded and that's the real problem.

Here is what that error message really means:

"No agent could be found with the following capabilities: msbuild, visualstudio, vstest. In fact I didn't actually find ANY build agents configured for the selected build queue."

So you're thinking that doesn't apply to you because you just created a build agent?

Well, maybe you did, but here's what probably happened:

  • You created a new pool (for no reason other than you just thought you ought to).
  • You then created a queue under that pool.
  • You ran the PowerShell script to create an agent and you assumed it put it in the pool you just created....
  • But it didn't - it put it in the 'default' pool which you aren't even using...

Aha! So here's what happens when you build:

  • You select a queue from the dropdown.
  • TFS tries to build by looking for the pool that corresponds to that queue and it doesn't find any agents AT ALL there, so you get a stupid useless red-herring error message.

When I finally realized what happened I just deleted my cutely named pool + queue and just reverted to using the default pool.

Next time I will try to pay more attention to this message during the PowerShell configuration:

Configure this agent against which agent pool? (default pool name is 'default')

You will have to create a queue under the pool, but then your agent should start working.

If you have a genuine with a certain capability being absent from your agent you can check what your agent supports via the 'capabilities' tab shown here. Of course msbuild, visualstudio and vstest are all here :-)

Enter image description here

查看更多
疯言疯语
4楼-- · 2019-01-14 15:32

Install Visual Studio on your build agent, then restart the build agent. Restarting the build agent will capture the added Capabilities.

查看更多
地球回转人心会变
5楼-- · 2019-01-14 15:32

Although none of previous answers worked for me, the post by Simon_Weaver pointed me in the right direction.

He mentioned that vstest was in his list, but it wasn't in mine. I fixed it by adding a user-defined capability named "vstest" with the full path to vstest.console.exe under Visual Studio 2017.

查看更多
登录 后发表回答