visual-studio-2010 - MSTest 工作流事件执行错误

标签 visual-studio-2010 workflow mstest tfsbuild

在为我的 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\")

不成功。

提前致谢

最佳答案

我通过在构建定义中使用以下命令解决了这个问题:

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

以这种方式使用变量:
%VS100COMNTOOLS%

(或 %VS90COMNTOOLS% 对于 Visual Studio 2008)我不需要向构建服务器的 PATH 环境变量和 mstest.exe 添加任何内容。已成功解决。

关于visual-studio-2010 - MSTest 工作流事件执行错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8503269/

相关文章:

visual-studio-2010 - 使用 msbuild 构建解决方案文件

svn - Subversion 工作流 : force update, 构建,提交前测试

python - 有人知道 Python 中的工作流框架/库吗?

git - 在 Github-Dockerhub 上自动构建的 Docker 工作流程

wpf - 使用 siteoforigin 包 Uri 单元测试 WPF 应用程序

visual-studio-2010 - 如何对 Ook 语言集成示例进行单元测试?

visual-studio-2010 - Visual Studio 2010 RTM 在启动时崩溃,错误为 "Exception has been thrown by the target of an invocation"

visual-studio-2010 - 远程调试时可以使用 Visual Studio 2010 中的监 window 口吗?

string - MSTest 项目无法获取本地化字符串?

C++/Visual Studio - 如何输出到测试输出窗口?