5

I'm getting the following error on a TFS2013 build:

TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''.

Looking here, it would seem that the answer to this is to change the test runner from VS test runner to MSTest. However, when I try to edit the Test Run in the build definition, the test runner option is set to Visual Studio Test Runner and greyed out. What determined what is shown in this box, and how can I add MSTest?

I have installed VS2012 agents for handling tests on the server.

Community
  • 1
  • 1
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
  • Did you try restarting build agent process? – suresh2 Apr 17 '14 at 10:56
  • Tried restarting the build server - more than once – Paul Michaels Apr 17 '14 at 11:09
  • 1
    possible duplicate of [The directory containing the assemblies for the Visual Studio Test Runner is not valid](http://stackoverflow.com/questions/20163889/the-directory-containing-the-assemblies-for-the-visual-studio-test-runner-is-not) – SteveC Jun 09 '15 at 15:16

3 Answers3

2

I fixed this by installing VS2013 on the build agent

Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
  • 2
    I had exactly the same issue and this was the only tip that actually fixed it. Probably there are better ways, but probably none as quick as this. So if you're not in the luxury position to waste hours, just install VS2013 Express on the build server. – Geoffrey Jul 04 '14 at 08:02
  • Did you try to install the VS2013 Agents first (which worked for me)? Over the years I keep relearning to agree with your 'just install visual studio on the build server' statement. Microsoft DOES 'support' many Team Build scenarios without VS installed and with MSBuild alone, however in practice this is very difficult to do and confining (this VS test runner is a perfect example) – JohnZaj Apr 28 '16 at 17:41
0

We had the same problem as the OP but, because the TFS server is considered a production box (other departments use it for other things), we were not permitted to install VS2013 on the server. The same applied to any third party tools needed for builds, they were a pain to integrate into the build.

I eventually worked round this by using another dev box to act as a build server for TFS. By installing the Build Server component of TFS on the dev box and setting up a controller and build agents on that box, TFS could pass the responsibility for the actual build to the dev box, on which we could install anything, without compromising the TFS server itself.

While it is not perfect - an extra box and VS2013 license needed - it is by far the easiest way to avoid poluting a production TFS box. Alternatively, nominate a developer's own box and install the build agent there - the environment is ready built, it will simply slow down a little during a build.

Mike
  • 2,120
  • 1
  • 23
  • 40
  • VS Express is enough to build and execute the tests - no license required. – Christian Apr 10 '15 at 12:14
  • @Christian As far as I know, Express editions do not allow users to use extensions/plugins, so if they form part of your build then sadly you might have to cough up for a license after all, but your point is well taken. – Mike Apr 11 '15 at 13:22
  • Double check the license requirements. I am not an expert, but the build license should be covered by the user queuing the build. – Giulio Vian Apr 20 '15 at 09:00
-1

Look at section Define Multiple Test Runs of this article. It is very informative and explains different configuration in dept. Hope this helps !!!

Arafat
  • 1,390
  • 2
  • 12
  • 18