10
votes

We have upgraded our TFS installation from 2012 to 2013. When running our builds they will fail with the following error if unit tests are enabled:

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

The build process template or build definitions has not been changed after the upgrade. The upgrade process did not change them. Where can I provide the path to the Visual Studio Test Runner and where is it located on disk?

I do not know if "Visual Studio Test Runner" is a new option for 2013 or if this setting was also used before, when we were using TFS 2012.

We use Visual Studio Professional 2012 on the build server.

6

6 Answers

6
votes

You have two choices:

  1. Install Visual Studio 2013 or the Agents for Microsoft Visual Studio 2013 if you want to continue to use the Visual Studio Test Runner.
  2. Switch to MS Test as the test runner and change the Tools Version in the Build-Workflow. This will allow you to continue using Visual Studio 2012 on the build server.

Note: Tank you SteveC to post the link to the agents only site

7
votes

To do the second choice in Oswald's answer:

  1. Right click on your build definition and select "Edit Build Definition..."
  2. Click on the "Process" group in the build definition.
  3. Find the "Automated Tests" group under "Build Process Parameters" and click on the ellipsis.
  4. A "Automated Tests" dialog box will appear, select the test under "Tests to run" that you want to edit.
  5. Click on the "Edit", a "Add/Edit Test Run" dialog box will appear.
  6. Change the test runner to "MSTest.exe test runner"

Note: I am using TFS2012

5
votes

The solution for us was to install the Agents for Microsoft Visual Studio 2013, rather than Visual Studio 2013

3
votes

As an alternative to installing Visual Studio on the build machine, you can simply copy the files from your local machine to the build machine.

ZIP the TestWindow folder found in

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft

then copy it to the build machine, and unzip to the same location.

1
votes

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.

0
votes

If your project does not have unit tests, you can just disable the unit test execution on the build definition.

To do that, edit the build definition, under process tab, delete everything in field "Automated Tests"