【发布时间】:2016-03-10 16:05:59
【问题描述】:
我在我的一台机器上运行单元测试时遇到问题,测试应用程序在几秒钟后就关闭了。这是调试测试时的输出显示:
在 UnitTestProject1.exe 中的 0x7525D8A8 处引发异常:Microsoft C++ 异常:内存位置 0x0A17C5F0 处的 EETypeLoadException。
在 UnitTestProject1.exe 中的 0x7525D8A8 处引发异常:Microsoft C++ 异常:[rethrow] 在内存位置 0x00000000。
在 UnitTestProject1.exe 中的 0x7525D8A8 (KernelBase.dll) 处引发异常:0x40080201:WinRT 发起错误(参数:0x8007274C、0x000000B9、0x0EE4F6AC)。
抛出异常:mscorlib.ni.dll 中的“System.Exception”
WinRT信息:连接尝试失败,因为连接方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应。
抛出异常:System.Private.ServiceModel.dll 中的“System.Net.Sockets.SocketException”
抛出异常:mscorlib.ni.dll 中的“System.Net.Sockets.SocketException”
抛出异常:System.Private.ServiceModel.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.ServiceModel.EndpointNotFoundException”
抛出异常:mscorlib.ni.dll 中的“System.Reflection.TargetInvocationException”
这些异常与我的应用程序完全无关,因为我的应用程序不需要互联网并且未达到测试方法中的代码。它们来自测试框架。
相同的解决方案在所有其他机器上都可以正常运行测试(相同的 Windows 10 版本)。我认为问题在于问题机器上的系统关闭了单元测试所需的一些服务。我在任何地方都找不到任何相关的东西。我应该怎么做才能解决这个问题,我不想重新安装 Windows。
【问题讨论】:
-
我遇到了同样的问题,重新安装 VS 并没有为我解决这个问题。但和你一样,它在另一台具有完全相同的 windows/sdk/visual studio 版本的机器上运行良好。
标签: c# unit-testing windows-10 uwp