Brett C
Brett C

Reputation: 9

TFS 2015 Build: Unable to determine the location of vstest.console.exe

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:

  1. Visual Studio Build (set to use version 2013)
  2. 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:

How can I get the agent to recognize/find vstest.console.exe? Is there something I am overlooking?

Upvotes: 0

Views: 3373

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

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.

enter image description here


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

enter image description here

Upvotes: 0

Related Questions