The directory containing the assemblies for the Visual Studio Test Runner is not valid

756 views Asked by At

Our CI environment setup with [TFS Server 2015 + Visual studio build tools 2017]. When I try to run C# based unit test on environment it shows this error TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''.

Then I tried to fix the error by fallowing ways

  1. Installed VS test agent 2015 in the machine https://learn.microsoft.com/en-us/visualstudio/test/lab-management/install-configure-test-agents
  2. Copied C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow from my computer to exact location to CI machine.
    1. Changed test runner from Visual Studio Test Runner to MS Test Runner

But still same error. Looks like tfs server not able to find the test agent folder. Anyone has idea how to fix this

1

There are 1 answers

3
PatrickLu-MSFT On

Seems you have VS 2017 Build Tools installed only, no VS IDE on the CI environment.

You need to install VS IDE. VS build tools doesn't contain the "test platform". In order to run the tests, you require to install full IDE.

Currently to run the VsTest task, the task has dependency on Visual Studio IDE. But some changes will have in the near future.

We have decided to go with a 'tools installer' which can be used to get the test platform instead of needing the IDE. If you have the IDE, great. If you don't, the tools installer will get the test platform on the agent for you. It is already on backlog and expected to be available on VSTS in a few sprints.

More details please take a look at the discussion in this issue: vstest capability not detected when installed without Visual Studio