Setup
I installed TFS 2015 with Update 4 and Visual Studio 2013 Professional with Update 5 on a server. I then installed a TFS build agent (version 1.95.4) on the same server.
I noticed that the build agent's capabilities included MSBuild and VisualStudio (as expected), but not VSTest...so I manually added VSTest as a capability with the folder that contains vstest.console.exe (and yes, it is on the D drive):
D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
I created a simple build definition that contains the following steps:
- Visual Studio Build (set to use version 2013)
- Visual Studio Test (set to use version 2013)
Problem
When I queue a build, the code builds just fine but when the tests run I receive the following error:
System.IO.FileNotFoundException: Unable to determine the location of vstest.console.exe
What I have tried
I have searched for a solution, but could not find anyone in the same predicament as I am version-wise (with TFS 2015 and VS 2013 Professional). Although, I did try multiple other solutions that were proposed for different TFS/VS version combinations, to no avail:
Ensuring the following registry items exist:
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\12.0
ShellFolder
entry with valueD:\Program Files (x86)\Microsoft Visual Studio 12.0\
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\12.0\EnterpriseTools\QualityTools
InstallDir
entry with valueD:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
Reinstalling build agent
- Adding 'VSTest' as environment variable
- Setting Visual Studio Test task to use 'Latest Version' instead of '2013'
How can I get the agent to recognize/find vstest.console.exe? Is there something I am overlooking?