Reputation: 9
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:
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
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 value D:\Program Files (x86)\Microsoft Visual Studio 12.0\
HKLM\Software\Wow6432Node\Microsoft\VisualStudio\12.0\EnterpriseTools\QualityTools
InstallDir
entry with value D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
Reinstalling build agent
How can I get the agent to recognize/find vstest.console.exe? Is there something I am overlooking?
Upvotes: 0
Views: 3373
Reputation: 30432
I tested at my side, the VStest can be recognized correctly (default install, C Drive). And only a ShellFolder
registry key under HKLM\Software\Wow6432Node\Microsoft\VisualStudio\12.0
Please try to deploy a new agent, then check if the VSTest can be recognized in capabilities.
If that doesn't work, you can try to uninstall VS2013 first, then reinstall it to C Drive as default.
UPDATE:
You can try to add the VStest as USER CAPABILITIES, then check if that works.
Please try to add :
VSTest_12.0 D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
If that doesn't work, just try to specify the vstest.console.exe directly.
VSTest_12.0 D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
Upvotes: 0