The project uses MSTest and everywhere I searched it was written that MSTest can be installed only by installing Visual Studio too, or by manually coping the bits in a painful manual process (http://www.shunra.com/shunrablog/index.php/2009/04/23/running-mstest-without-visual-studio/ , http://sparethought.wordpress.com/2011/07/12/mstest-2010-on-the-build-server-without-vs2010-installed/ etc..).
Since I don’t enjoy having to manually register assemblies in GAC or set registry entries, I searched for a better way.
After thinking for a while I realized that Microsoft does not ask us to install a full blown Visual Studio on each TFS build agent, especially when we have multiple ones – I searched and found this: Visual Studio Test Agents 2010 – it’s an installer that allows me to install just the VS Test Agent part, without having to run it all the time.
Sure, it contains more stuff, not just MSTest, but is much smaller (less than 300MB) than a full VS2010 installation, that doesn’t let me install just MSTest.
The test agent installed MSTest where I expected to be: C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\…
Of course, before using this in a real-world project, make sure you checked the licensing restriction – probably each developer using the CI server must have a valid VS2010 Premium, Ultimate or Test Professional license.