繁体   English   中英

UWP应用程序的单元测试无法在Visual Studio 2015上运行

[英]Unit test for UWP app failed to run on Visual Studio 2015

我在我的一台机器上运行单元测试时遇到问题,测试应用程序几秒后才关闭。 以下是调试测试时的输出显示:

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。

似乎无法建立与Test Emulator的连接。 构建TestApp时,请确保已将Build配置设置为Debug - 任何CPU(而不是ARM)此外,您不应通过按F5运行测试项目,而是从TestExplorer运行测试。

我最终重新安装VS 2015,问题现在消失了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM