Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 410
Jean Jimenez Avatar asked Aug 05 '15 18:08

Jean Jimenez


2 Answers

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

like image 173
Daniel Mann Avatar answered Sep 28 '22 21:09

Daniel Mann


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

like image 26
Simon_Weaver Avatar answered Sep 28 '22 20:09

Simon_Weaver