I am getting the next output log error when executing MSTest workflow activity for my Team Build 2010:
MSTest
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe /nologo /usestderr /testcontainer:"D:\TFS\Builds\MyProyect\Debug\W_DEBUG\W_DEBUG_20111214.15\Binary\OrderedTest1.orderedtest" /publish:"http://localhost:8080/tfs/DefaultCollection" /publishbuild:"vstfs:///Build/Build/2550" /teamproject:"MyProyect" /platform:"Mixed Platforms" /flavor:"Debug"
The directory name is invalid
If I execute that command on my build server locally (surrounded with double quotes the MSTest.exe path) it works perfectly.
How can I set that absolute path to the MSTest activity? I have tried setting MSTest ToolPath property to:
System.IO.Path.GetFullPath("C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\")
unsuccessfully.
Thanks in advance
I solved the issue by using the following command in my build definition:
in this way using the variable:
( or
%VS90COMNTOOLS%for Visual Studio 2008 ) I did not need to add anything to the PATH environment variable of the build server andmstest.exewas resolved successfully.