blog community
How to fix Team build Error in TFS2010 “MSTest.exe not found”
Marcel de Vries, MVP Team System

Syndication

I must say it really helps a lot when you have someone available from the dev teams to solve some issues with the Beta Bits. As I told in my previous post I worked with Adam Bar from the Microsoft North Carolina Office for our devdays pre-conference. While working on my demo’s I ran into a problem where I did have a tests working locally, but once I ran an Team Build on the solution, I always got the message that MSTest.exe could not be found.

This happened to be a known bug on 64 bit machines and can easily be fixed by adding a registry key to the non wow64 node in the registry. It appears that in Beta 1, from the team build environment the location of MSTest is searched in the non 64bit registry location. What you need to do to fix this problem is the following:

Use regedit to add the following Key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0

Key Name: InstallDir and set that key to the location where Visual Studio 2010 is installed (e.g. C:\program files\ Microsoft Visual Studio 10\Common7\IDE)

Now start a new build and you will see the build will find MSTest again :-)

Cheers,
Marcel


Posted 11-06-2009 12:57 by marcelv

Comments

lEiF wrote re: How to fix Team build Error in TFS2010 “MSTest.exe not found”
on 22-06-2009 9:23

Marcel - I have tried your solution, but it does not work on my machine because mstest.exe does not exist. Do I have to install visual studio on the build computer to be able to run unit tests during CI-builds...?

marcelv wrote re: How to fix Team build Error in TFS2010 “MSTest.exe not found”
on 26-06-2009 8:02

I have only worked with a one machine setup until now, so I have Visual Studio on my build server. I think you need to install VS on the build server since MSTest.exe is installed as an integral part of Visual Studio. To be honest, I don't think we will see the day that we don't need to install Visual Studio on our build servers anymore….. This is a problem we had in 2005, 2008 and probably will keep in 2010.

Kyle wrote re: How to fix Team build Error in TFS2010 “MSTest.exe not found”
on 26-02-2010 18:28

You do have to install visual studio yes... but i've found that you can install the RC version of Visual Studio 2010 grab the v7.0A folder and copy it to your Microsoft SDKs\Windows Folder. Then remove Visual stuido off the build server. Make your registry hack and all of a sudden everything starts working :)

Trobin7 wrote re: How to fix Team build Error in TFS2010 “MSTest.exe not found”
on 03-03-2010 22:13

I'm getting the same error for Visual Studio 2008

-- MSBUILD : warning MSB6003: The specified task executable "MSTest.exe" could not be run. The system cannot find the file specified.

Do we have to install Visual Studio 2008 on the build server to run unit tests with the build or there other options to be able to run the tests?

marcelv wrote re: How to fix Team build Error in TFS2010 “MSTest.exe not found”
on 04-03-2010 11:00

Yes, You also need to install VS2008 if you want to run unit test on the build server. unfortunately there is no seperate install of the test tools for the build

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Enter code (required)
Powered by Community Server (Commercial Edition), by Telligent Systems