4

I Have VS 2015 only installed on my TFS 2013 build server, and get the following error:

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

Other sites say to install VS 2013, but why would I have to install VS 2013 on the build server to run unit tests when I have VS 2015 installed?

I have the following switches on my build:

  /p:VisualStudioVersion=14.0  /tv:14.0

(This is not a duplicate question as I am using TFS 2013 and am trying to use the Agile Test Runner not MS Test)

user917170
  • 1,591
  • 15
  • 28

2 Answers2

2

Check the solution in this case:

  1. Install VS 2015 or Microsoft Build Tools 2015.
  2. Edit build to use a build process template called TfvcTemplate.12.xaml.
  3. Set MSBuild arguments to /tv:14.0.

But this setting only works for build, not test. As there is no way to set the tool version or tool path for "Run VS Test Runner" activity, installing VS 2013 should be the only way to get rid of this error.

Community
  • 1
  • 1
Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • As mentioned, VS 2015 is already installed, I am already using the TfvcTemplate.12.xaml template, and I am using the /tv:14.0 switch. Do you know where it gets the directory from to look for the test runner? I could just put some .dlls in a MSBuild 12 folder but it isn't looking anywhere. – user917170 Mar 22 '16 at 23:43
  • The template only has ToolVersion, not ToolPath, when I set it to "14.0" it says Option Strict On disallows implicit conversion from 'Double' to 'String'. Here is a pic: http://imgur.com/Swg4cqA. If I proceed anyway I get TF215097: An error occurred while initializing a build for build definition Exception Message: Cannot set unknown member 'Microsoft.TeamFoundation.Build.Activities.RunScript.FailOnNonZeroExitCode'. (type XamlObjectWriterException). Honestly, it's a bit too much trouble, I'll try to convince them to update to TFS 2015 and try the new builds. These 2013 ones are arcane! – user917170 Mar 24 '16 at 00:15
  • Or you can consider installing both VS 2015 and VS 2013 on your build agent machine. – Cece Dong - MSFT Mar 25 '16 at 09:02
  • Yes I think installing VS 2013 is the only way. If you add an answer for that i'll mark it as accepted. – user917170 Mar 29 '16 at 00:08
  • As we can't set the tool version or tool path for "Run VS Test Runner" activity, I agree with you, VS 2013 needs to be installed. I have modified the answer. – Cece Dong - MSFT Mar 29 '16 at 02:01
0

I had a similar problem - was getting the error

TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid 'D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow'.

It ended up being that even though Visual Studio 2015 was installed on the build agent, the user that the Build Agent was running as didn't have read/execute permissions to that folder.

wags1999
  • 865
  • 1
  • 7
  • 23
  • 1
    Fortunately for you, the error was already specific to VS 2015 since it was reporting a real path. The OP reported that the path was blank, so installing VS 2013 is a way to fix. – Matt Ruwe Jul 13 '16 at 19:20