在VS2015中的调试中运行单元测试时出现DisconnectedContext错误 [英] DisconnectedContext error when running Unit Tests in debug in VS2015

查看:136
本文介绍了在VS2015中的调试中运行单元测试时出现DisconnectedContext错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2015 Enterprise中运行单元测试时遇到此问题.每当我在调试模式下运行任何单元测试时,都会出现以下错误:

I have this problem with running unit tests in VS2015 Enterprise. Whenever I run any unit test in debug mode, I get the following error:

托管调试助手"DisconnectedContext"在"my_path_to_VS \ COMMON7 \ IDE \ COMMONEXTENSIONS \ MICROSOFT \ TESTWINDOW \ te.processhost.managed.exe"中检测到问题.

Managed Debugging Assistant 'DisconnectedContext' has detected a problem in 'my_path_to_VS\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\te.processhost.managed.exe'.

我尝试在VS2015上运行修复程序,但没有帮助.尝试再次卸载和安装,问题仍然存在.奇怪的是,我在SVN上有一个代码,而我的朋友却能够在他的机器上的调试中运行相同的代码而没有任何问题.

I tried running repair on VS2015 and it did not help. Tried uninstalling and installling again and the issue persist. The strange thing that I have a code on SVN and my friend in able to run the same code in debug on his machine without any issues.

只需运行测试(无需调试器)即可正常工作.

Just running the test (without debugger) works without any problems.

我确实安装了ReSharper.会导致这个问题吗?

I do have a ReSharper installed. Could that be causing this issue?

更新 好的,因此Resharper导致了此问题.仅当我通过ReSharper图标(TestMethod名称旁边)运行测试时,才会发生此问题.当我执行Test-> Debug-> All Tests时,它运行良好.有任何想法吗?也许是ReSharper的错误?

UPDATE Ok so Resharper is causing this issue. This issue only happens when I am running the test through the ReSharper icon (next to the TestMethod name). When I do Test->Debug->All Tests it runs fine. Any ideas? Maybe ReSharper bug?

推荐答案

无论我从何处调用测试(VS或Resharper),我也遇到了Rashaper,并遇到了这个问题.我已经通过将测试和项目的目标体系结构更改为x64克服了这一问题.但是问题的根源对我来说仍然是未知的.

I also have Rashaper and faced with this problem, no matter from where I am calling the tests (VS or Resharper). I've overcome this by changing the target architecture of the tests and the projects to the x64. But the source of the problem is still unknown for me.

这篇关于在VS2015中的调试中运行单元测试时出现DisconnectedContext错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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