gpt4 book ai didi

unit-testing - 使用模拟器进行 .NET CF 单元测试 - 测试运行错误

转载 作者:行者123 更新时间:2023-12-04 05:04:25 27 4
gpt4 key购买 nike

试运行错误:

执行此测试所需的测试适配器('Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter、Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter、Version=9.0.0.0、Culture=neutral、PublicKeyToken=b03f5f7f11d50a3a')可以不加载。检查测试适配器是否安装正确。错误:智能设备主机适配器初始化失败。

实际情况:
已知问题“辅助线程中的单元测试异常会杀死 vstesthost”

已通过添加解决
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTestHost.exe.config

以下行:

Microsoft.VisualStudio.SmartDevice.UnitTestFramework.dll 已添加到 GAC:

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"-i "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.SmartDevice.UnitTestFramework. dll”

但是我仍然收到错误消息并且无法在模拟器上运行单元测试。

或者这仍然是 Visual Studio 2008 的未解决问题,我应该尝试其他工具/可能性吗?

enter image description here

System.IO.FileNotFoundException 未处理

系统找不到文件

源="设备连接管理器"
堆栈跟踪:
在 Microsoft.VisualStudio.DeviceConnectivity.Interop.ConManServerClass.DownloadPackage(String pwszPackageId)
在 Microsoft.SmartDevice.Connectivity.FileDeployer.DownloadPackage(ObjectId packageId)
在 Microsoft.VisualStudio.SmartDevice.TestHostAdapter.DeviceAgent.RunConfigDevice.InitializeStreamingWithDevice()
在 Microsoft.VisualStudio.SmartDevice.TestHostAdapter.DeviceAgent.DeviceHostAdapter.initializeInternal()
在 System.Threading.ThreadHelper.ThreadStart_Context(对象状态)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
内部异常:

http://img688.imageshack.us/img688/2025/20120808testrunerrorexc.gif

最佳答案

如果你刚安装了移动设备的SDK,可能安装了一个没有初始化的框架。尝试重新启动。

如果您安装了多个移动 SDK(WM5、WM6.1、WM6.3.5 等),请确保您的项目正在尝试启动您的目标版本。

如果一切都失败了,您可以尝试卸载模拟器,重新启动(因为我们喜欢 Windows),再次安装,重新启动(因为它仍然是 Windows),然后返回到您的项目。

关于unit-testing - 使用模拟器进行 .NET CF 单元测试 - 测试运行错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11866011/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com