8

I have TFS On-Premises, and I have this errror when queueing a new build.

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

I found this answer: No agent could be found with the following capabilities: msbuild, visualstudio, vstest?

But is there any way to fix it on-premises without installing Visual Studio on the build server?

Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
  • 3
    Possible duplicate of [No agent could be found with the following capabilities: msbuild, visualstudio, vstest?](http://stackoverflow.com/questions/31840364/no-agent-could-be-found-with-the-following-capabilities-msbuild-visualstudio) – Daniel Mann Mar 25 '16 at 12:48
  • Installed only MSBuild and C# compiler from VS 2017 Community RC-> still that error. Installed Build Tools for VS 2017 RC -> still that error. Finally, just installed Desktop development of VS 2017 Com. RC -> Solved. It seems I have to install the full VS, not just build tools. A lot of waste of disk space. – Damn Vegetables Mar 01 '17 at 22:18
  • Hi @LuisValencia did you have TFS2017 on premises? Do I also need to install Visual Studio 2017 on the same machine? – doorman Nov 08 '17 at 17:01

2 Answers2

4

I had this issue with Visual Studio 2017 installed on the build server (on-prem):

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

When I upgraded a Test Controller the Build Agent lost some of its capabilities, such as VSTest:

enter image description here

I added these capabilities back as User Capabilities:

enter image description here

MSBuild_15.0 = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\
MSBuild_15.0_x64 = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\
VSTest = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow
VSTest_15.0 = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow

VisualStudio = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
VisualStudio_15.0 = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\
VisualStudio_IDE = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\
VisualStudio_IDE_15.0 = C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\

Then I got the infamous error:

MSBuild not found for version '15.0' and architecture 'x86'

I searched the web high and low, I did so many things to try and resolve this issue, I finally found this saying its been fixed in TFS update 2.

I upgraded TFS from update 1 to 2 and that did fix the problem.

Jeremy Thompson
  • 61,933
  • 36
  • 195
  • 321
2

If you don't want to install VS on the build server you could add a new build agent and install VS there.

chief7
  • 14,263
  • 14
  • 47
  • 80