Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 872
Luis Valencia Avatar asked Mar 25 '16 03:03

Luis Valencia


2 Answers

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.

like image 53
Jeremy Thompson Avatar answered Oct 09 '22 00:10

Jeremy Thompson


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

like image 45
chief7 Avatar answered Oct 08 '22 22:10

chief7