加利奥错误:MSTest的可执行文件未找到 [英] Gallio error : MSTest executable was not found

查看:246
本文介绍了加利奥错误:MSTest的可执行文件未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图分析我的声纳亚军我的VS2012 C#解决方案,我已经得到了与加利奥一个恼人的问题。当加利奥尝试推出我的单元测试,我可以找到在日志中此问题:

I've got an annoying issue with Gallio when I try to analyse my VS2012 C# solution with my sonar-runner. When Gallio try to launch my unit test I can find this issue in the logs :

  [error] Assembly XXXX   
  Cannot run tests because MSTest executable was not found

我已经尝试过的解决方案的一些命题曝光<一HREF =http://stackoverflow.com/questions/17176296/using-gallio-to-run-vstest-from-vs2012>这里和的这里(我已经安装了代理的VS 2012和我添加了一个路径的注册表项我的VS2012安装),但似乎没有任何工作。

I've already tried some propositions of solution exposed here and here (I have installed Agents for VS 2012 and I have added a registry key with the path of my VS2012 installation) but nothing seems to work.

感谢您通过您的帮助。

编辑:

看来,这个问题从加利奥源代码中的硬编码的注册表值来,因为当我尝试添加为VS2010的安装目录注册表项指向我VS2012安装,我可以看到一个新的错误消息。

It seems that this issue come from an hard coded registry value in Gallio source code because when I try to add the InstallDir registry key for VS2010 to point to my VS2012 installation I can see a new error message.

这新的错误是I / O相对于下面的DLL的异常:Microsoft.VisualStudio.QualityTools.CommandLine.dll版本10.0.0.0这我能在我GAC_MSIL目录,但在11版找到我的结论是,加利奥不与VS2012和MSTest的对应版本完全兼容。

This new error is an I/O Exception relative to the following DLL : "Microsoft.VisualStudio.QualityTools.CommandLine.dll" version 10.0.0.0 which I'm able to find in my GAC_MSIL directory but in version 11. My conclusion is that Gallio isn't fully compatible with VS2012 and the corresponding version of MSTest.

我要去调查,以找到一种方法来手动生成单元测试报告称,声纳就能店。

I'm going to investigate to find a way to manually generate Unit testing reports that Sonar will be able to store.

编辑2:

有终于没有办法收集声纳MSTest的报告现在。我发现的唯一的解决方案是用MSTest的做每一个单元测试转换为NUnit测试,以便能够与加利奥运行它,并收集在我的声纳服务器的结果。

There is finally no way to collect mstest reports in sonar for now. The only solution I found is to convert every unit test made with MSTest into an NUnit test to be able to run it with gallio and gather the results in my Sonar server.

推荐答案

以下内容添加到您的machine.config位于C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

Add the following to your machine.config located at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.CommandLine"
                publicKeyToken="b03f5f7f11d50a3a"
                culture="neutral" />
      <bindingRedirect oldVersion="10.0.0.0"
               newVersion="11.0.0.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>



然后,你将需要添加一个名为INSTALLDIR注册表项与
INSTALLDIR值=> C:\Program文件(x86)\Microsoft的Visual Studio 11.0\Common7\IDE\
到以下位置
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ VisualStudio\10.0

Then you will need to add a registry key called InstallDir with a value of "InstallDir => C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\" to the following location HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0

然后运行以下命令
REGSVR32C:\YourSonarInstalation\opencover\x86\OpenCover.Profiler.dll

Then run the following command regsvr32 "C:\YourSonarInstalation\opencover\x86\OpenCover.Profiler.dll

正在这里讨论的问题,在可能的解决方案上面被张贴在几天前
https://code.google.com/p/mb-unit/issues/detail?id=899

The issue is being discussed here. The potential solution above was posted a few days ago. https://code.google.com/p/mb-unit/issues/detail?id=899

这篇关于加利奥错误:MSTest的可执行文件未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆