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

tfstfs-2015tfsbuild

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?

Best Answer

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.

Related Topic