Error running MSTest - Could not load file or assembly Microsoft.VisualStudio.QualityTools.CommandLine


I'm getting the following error when I try to run the UT project using the runner type os MSTest. I've VS2013 installed on the same machine where TeamCity is installed - but don't see this library in GAC. If anyone has a resolution to this, could you please respond.

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.CommandLine, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.VisualStudio.TestTools.RunnerCommandline.Runner.Execute(String[] args)
   at Microsoft.VisualStudio.TestTools.RunnerCommandline.Runner.Main(String[] args)
No assemblies, run configuration and test metadata were found
Process exited with code 255

Let me know if you need more details.

Comment actions Permalink

What version of MSTest did you select in the Drop Down List in the build step?

The error message, says it is looking for version, which would suggest Visual Studio 2012, as per here:

Which won't work if you have 2013 installed.


Comment actions Permalink


Are you able to run the same build via console using MSTest.exe on the same machine and under the same user (not from TeamCity)?
Please read a related blog post.


Please sign in to leave a comment.