Wednesday, 13 November 2013

Running MS Test on Team City without installing Visual Studio

One of the challenges if you are using MS Test has always been being able to run the tests on your Team City server without installing Visual Studio.

The reason for this is that MS Test expects assemblies in the GAC, registry entries, as well as other assemblies outside the GAC.

Now it is possible to pick apart what’s needed and install it all manually (as this post details) but that’s a lot of effort and it only takes one thing to be wrong and nothing’s going to work.

In the past I was faced with this challenge and started down the route of doing the manual install (which went wrong) and then I discovered Visual Studio Agents.

Visual studio agents are what you would use if you had on premise TFS Build server and wanted to add additional servers to support the build, the agent doesn’t contain the entire Visual Studio but does have just the bits you need to run things such as MS Test.

There are versions of the agents from VS2008 through to VS2013 so you should be covered whatever version of VS you are using.

Yes for the purists out there this does mean there is more on your CI server than just what’s needed to run your code, but we are talking about MS Test here Winking smile


  1. Hey,

    Thanks for posting this, it is really helpful!

    Do you know anything about the licensing side of things? Do you need to higher Visual Studio license, say the Test Edition, to allow for the installation of this?



    1. As far as I know (and this accepted answer concurs as long as you have a license for visual studio then you don't need a license for putting it on the build server.

  2. This was the info I was looking for. I already stumbled upon the VS Agents but the Teamcity docs just state that you require the full visual studio version. This simplifies things considerably, thanks!

    Eric Venneker