Error executing MSTest operation

I get the following output log error while doing the MSTest workflow 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 this command on my build server locally (surrounded by double quotes, the MSTest.exe path), it works fine.

How can I set this absolute path for MSTest activity? I tried setting the MSTest ToolPath property to:

 System.IO.Path.GetFullPath("C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\") 

to no avail.

Thank you in advance

+4
source share
2 answers

I solved the problem using the following command in the definition of my assembly:

 <Exec Command="&quot;%VS100COMNTOOLS%\..\IDE\MSTest.exe&quot; /testcontainer: 

this way using a variable:

 %VS100COMNTOOLS% 

(or %VS90COMNTOOLS% for Visual Studio 2008) I did not need to add anything to the build server PATH environment variable, and mstest.exe was successfully resolved.

+2
source

The problem I ran into was that this process was running as SYSTEM , however when starting MSTest it seemed to work like MACHINENAME$ , changing the owner to be a local user, fixed the problem and stopped MSTest from saving.

0
source

Source: https://habr.com/ru/post/1386299/


All Articles