【发布时间】:2026-02-08 18:30:01
【问题描述】:
为我的 Team Build 2010 执行 MSTest 工作流活动时出现下一个输出日志错误:
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
如果我在本地构建服务器上执行该命令(用双引号括起来 MSTest.exe 路径),它会完美运行。
如何设置 MSTest 活动的绝对路径?我尝试将 MSTest ToolPath 属性设置为:
System.IO.Path.GetFullPath("C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\")
不成功。
提前致谢
【问题讨论】:
-
您是否在构建服务器中安装了 Visual Studio?没有它,MsTest 就不存在。
-
正如我所说,如果我在本地(在构建服务器中)运行该命令,它会完美运行。事实上,我已经将包含“MSTest.exe”的整个文件夹移动到其他没有空格的路径(例如 C:\Common7\IDE\...)并且错误仍然存在。这不是路径空间的东西,我不知道为什么会这样。
-
有人对此有解决方案吗?
标签: visual-studio-2010 workflow mstest tfsbuild