How to add Visual Studio 2017 to Team Foundation Server Build Agent

tfstfs-2015visual-studio-2017

I've installed Visual Studio 2017 on my server to build projects. The server is running team foundation server 2015 Update 3. The TFS 2015 shows the option as Latest in Visual Studio Version but when I build the project then it don't build and says agent don't have capabilities visualstudio, vstest, msbuild.
I'm trying to manually add capabilities but it don't work and says Visual studio not found.

Best Answer

If your build agent is not installed on the same machine with your TFS server(which VS2017 installed). Give a try with install Visual Studio on your build agent, then reregister the build agent with TFS.

If your build agent and TFS server, VS2017 are on the same machine, but the VS is installed after the build agent configured. Then reregister the build agent with TFS, since the system capabilities are only discovered when the agent is first configured -- any changes made after that are not captured.

More ways please refer this similar question: No agent could be found with the following capabilities: msbuild, visualstudio, vstest?