8
votes

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?

2
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
Hi @LuisValencia did you have TFS2017 on premises? Do I also need to install Visual Studio 2017 on the same machine?doorman

2 Answers

4
votes

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.

2
votes

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