Cmdline工具vstest.console.exe抛出UnitTestIsolationException并在某个时刻停止执行 [英] Cmdline tool vstest.console.exe throws UnitTestIsolationException and stalls execution at some point

查看:145
本文介绍了Cmdline工具vstest.console.exe抛出UnitTestIsolationException并在某个时刻停止执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我们在Windows 2016 Standard(1607)服务器上使用Microsoft Visual Studio 2017企业版。在我们的.NET WPF应用程序上直接执行vstest.console.exe期间,我们遇到了一些可能导致怀疑的错误,即Visual Studio 2017可能存在错误或损坏的
安装。



该设置是在"nt authority \ system"下作为服务运行的Jenkins Slave。使用Visual Studio 2017构建和单元测试我们的项目文件。在通过
执行单元测试期间


" C:\Program Files(x86)\ Microsoft Visual Studio \\\ 2017 \ Enterprise @\\Common7 \IDE \Extensions\TestPlatform\vstest.console.exe" " Application.Unittests.Test.dll" / Platform:x86 / Logger:trx


我们反复收到错误消息。


Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException:无法获取探查器模块句柄'C:\Program Files(x86)\ Mesrosoft Visual Studio \ Shared \ Common \IntelliTrace \ProfilerProxy \ x86 \ Microsoft.IntelliTrace.ProfilerProxy.dll'。
找不到指定的模块---> System.ComponentModel.Win32Exception:找不到指定的模块

堆栈跟踪:

   在Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.LibraryMethods.GetModuleHandle(String fileName)

    at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath)

  ---内部异常堆栈跟踪结束---

   在Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath)

    at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.Initialize()

    at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()...
$


我们使用Enterprise Visual Studio在不同的服务器上进行相同的设置2015年和2017年.2015执行情况良好,而此服务器上的2017年显示与上述相同的错误。


我们是否错过了从2015年到2017年的一些事情?


解决方案

Hi Silvio Wiedrich,


欢迎来到MSDN论坛。


请尝试以下步骤:


>>检查"intelliTrace"是否属于安装在visual studio安装程序中



>>使用vs2017打开测试项目,在解决方案资源管理器窗口中删除dll文件,然后重新添加名为"Microsoft.QualityTools.Testing.Fakes.dll"的新版本dll文件。在vs2017安装路径下"C:\Program
Files(x86)\ Mysoftoft Visual Studio \Common7 \IDE \ PublicAssemblies"。


如果它仍然存在,请随时与我们分享更新信息。期待您的回复。


最好的问候,


Dylan



Hi,

we are using Microsoft Visual Studio 2017 Enterprise on a Windows 2016 Standard (1607) server. During direct execution of vstest.console.exe on our .NET WPF application we are getting several errors leading to suspicion, that there might be a bug or a corrupt installation of Visual Studio 2017.

The setup is a Jenkins Slave running as a service under "nt authority\system" using Visual Studio 2017 for building and unit testing our project files. During execution of the unit tests via

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" "Application.Unittests.Test.dll" /Platform:x86 /Logger:trx

we are getting repeatedly following error message.

Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to get profiler module handle 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\IntelliTrace\ProfilerProxy\x86\Microsoft.IntelliTrace.ProfilerProxy.dll'. The specified module could not be found ---> System.ComponentModel.Win32Exception: The specified module could not be found
Stack Trace:
    at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.LibraryMethods.GetModuleHandle(String fileName)
   at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath)
 --- End of inner exception stack trace ---
    at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.LoadProfilerModule(String profilerPath)
   at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.IntelliTraceInstrumentationProvider.Initialize()
   at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()...

We have an identical setup on a different server using Enterprise Visual Studio 2015 and 2017. The 2015 execution runs fine, whereas the 2017 on the this server displays the same error as above.

Did we miss something along the way from 2015 to 2017?

解决方案

Hi Silvio Wiedrich,

Welcome to MSDN forum.

Please have a try the following steps :

>>check if the "intelliTrace" is installed in the visual studio installer

>> open the the test project with vs2017, remove dll file in your solution explorer window, then re-add the new version dll file which is called "Microsoft.QualityTools.Testing.Fakes.dll" under the vs2017 installation path "C:\Program Files (x86)\Microsoft Visual Studio\Common7\IDE\PublicAssemblies".

If it persists, please feel free to share update information with us. Look forward to your reply.

Best Regards,

Dylan


这篇关于Cmdline工具vstest.console.exe抛出UnitTestIsolationException并在某个时刻停止执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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