0

我试图在没有安装 Visual Studio 2012MSTest2012的 jenkins 服务器上进行设置。到目前为止,我没有收到任何“Assembly not found”错误消息。

我打算做一些功能测试,所以我将一个vs2012项目从我的本地机器复制到我的 jenkins 服务器并在 cmd 中尝试了类似的操作:

C:\VS2011Stub\Common7\IDE>MSTest.exe /testcontainer:D:\Users\Jenkins\Documents\V
isualStudio2012\Projects\HelloWorld\UnitTestProject4\bin\Debug\UnitTestProject4.
dll

Microsoft (R) 测试执行命令行工具版本 11.0.50727.1 版权所有 (c) Microsoft Corporation。版权所有。

正在加载 D:\Users\Jenkins\Documents\VisualStudio2012\Projects\HelloWorld\UnitTest Project4\bin\Debug\UnitTestProject4.dll... D:\Users\Jenkins\Documents\VisualStudio2012\Projects\HelloWorld\UnitTestProject4\bin\Debug\ UnitTestProject4.dll Ein Aufrufziel hat einen Ausnahmefehler verursacht。

此错误消息(Ein Aufrufziel hat einen Ausnahmefehler verursacht -> in English: Exception has been throwed by the target of an invocation .)非常……无济于事。

在我的本地机器上,相同的 cmd 代码如下所示:

在此处输入图像描述

我不知道该怎么做...任何建议,解决方案???也许有人有同样的问题:/也许 mstest2012 仍然需要其他文件才能正常运行?

我对每一次帮助感到高兴!

编辑: 我按照这些步骤在我的詹金斯服务器上构建 MSTest.exe (VS2012) 作为独立程序

edit2: !!!问题解决了!!!

我复制的 GAC 文件夹中的一些 Microsoft.VisualStudio.QualityTools.#.dll 不包含版本 = 11.0.0.0,所以我打开 C:\Windows\Assembly 并查看了 Microsoft.VisualStudio.QualityTools.# 并检查了可用版本并在我的 jenkins 服务器上添加了缺少的最新 11.0.0.0 Microsoft.VisualStudio.QualityTools.#.dll 文件,并通过 gacutil(版本 4.0.30319.17929)注册了它们。

MSTest 现在可以作为独立程序运行,无需安装 MS Visual Studio 2012。

如果有人需要说明文件,请询问,我会上传=)

4

0 回答 0