如何在VS 2017中安装Coded UI组件,以便调试工作 [英] How to install Coded UI component in VS 2017 so that debugging will work

查看:84
本文介绍了如何在VS 2017中安装Coded UI组件,以便调试工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让Coded UI调试工作。 Visual Studio不会在断点上停止。一个简单的演示测试(仅在Excel工作表单元格中输入一个数字)在没有调试的情况下运行时会成功。但是在调试测试时,测试运行器
会立即出错,而不会尝试进入测试类构造函数(如果提供)或测试方法。



报告的错误是:

消息:单元测试适配器引发异常:
无法加载一个或多个请求的类型。检索LoaderExceptions属性以获取更多信息..

我正在运行Visual Studio 2017,版本15.5.0。



调试窗口的输出:

'testhost.x86.exe'(CLR v4.0.30319:DefaultDomain):已加载'C:\ WINDOWS \ Microsoft。 Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"。无法找到或打开PDB文件。 
'testhost.x86.exe'(CLR v4.0.30319:默认域):加载"C:\PROGRAM文件(X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\ EXTENSIONS\TESTPLATFORM\testhost.x86.exe"。无法找到或打开PDB文件。
'testhost.x86.exe'(CLR v4.0.30319:testhost.x86.exe):已加载'C:\PROGRAM文件(X86)\ MICROSOFT VISUAL STUDIO \2017 \ ENTERPRISE \ COMMON7 \\ \\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CoreUtilities.dll"。无法找到或打开PDB文件。
'testhost.x86.exe'(CLR v4.0.30319:testhost.x86.exe):已加载'C:\PROGRAM文件(X86)\ MICROSOFT VISUAL STUDIO \2017 \ ENTERPRISE \ COMMON7 \\ \\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.PlatformAbstractions.dll"。无法找到或打开PDB文件。
'testhost.x86.exe'(CLR v4.0.30319:testhost.x86.exe):加载"C:\PROGRAM文件(X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\\ \\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll"。无法找到或打开PDB文件。
'testhost.x86.exe'(CLR v4.0.30319:testhost.x86.exe):已加载'C:\PROGRAM文件(X86)\ MICROSOFT VISUAL STUDIO \2017 \ ENTERPRISE \ COMMON7 \\ \\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CrossPlatEngine.dll"。无法找到或打开PDB文件。



'QTAgent32_40.exe'(CLR v4.0.30319:TestAppDomain:0bb1983f-0f53-41cc-b4ed-143874102a64):空载"C:\PROGRAM文件(X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel.dll '
' QTAgent32_40。 EXE '(CLR v4.0.30319:TestAppDomain:0bb1983f-0f53-41cc-b4ed-143874102a64):空载' C:\VST\CodedUITestProject2\TestResults\abcdef_X#XXX ## 2017年12月5日11_05_06\Out \ CodedUITestProject2.dll'
线程0x1860已退出,代码为0(0x0)。
线程0x1dcc已退出,代码为0(0x0)。
异常抛出:mscorlib.dll中的'System.Threading.ThreadInterruptedException'
线程0x1cb0已退出,代码为0(0x0)。
线程0x2d54已退出,代码为0(0x0)。
线程0x2a40已退出,代码为0(0x0)。
线程0x1e04已退出,代码为0(0x0)。
程序'[8104] QTAgent32_40.exe:程序跟踪'已退出,代码为0(0x0)。
线程0x1714已退出,代码为0(0x0)。
线程0x265c已退出,代码为0(0x0)。
程序'[8104] QTAgent32_40.exe'已退出,代码为0(0x0)。
线程0x2d9c已退出,代码为0(0x0)。
线程0xde4已退出,代码为0(0x0)。
线程0x3bc已退出,代码为0(0x0)。
线程0x253c已退出,代码为0(0x0)。
程序'[12012] testhost.x86.exe:Program Trace'已退出,代码为0(0x0)。
程序'[12012] testhost.x86.exe'已退出,代码为0(0x0)。

我尝试修复Visual Studio并安装最新的位等无济于事。我在两台不同的机器上遇到了这个问题。


请参阅此  Stack Overflow   post。

解决方案

< blockquote>

您好Calvin,


感谢您在MSDN论坛上发帖。


此论坛正在讨论Visual Studio的设置和安装,因为您的与代码UI测试相关的问题,我帮助您将此案例移至此论坛以获得更好的帮助。



感谢您的理解


最好的问候,


I am unable to get Coded UI debugging to work. Visual Studio won't stop on a breakpoint. A simple demo test (which merely enters a number into an Excel worksheet cell) succeeds when it's run without debugging. But when debugging the test, the test runner errors immediately without attempting to step into the test-class constructor (if provided) or into the test-method.

The error reported is:

Message: Unit Test Adapter threw exception: 
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..

I'm running Visual Studio 2017, Version 15.5.0.

The Debug window's output:

'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Cannot find or open the PDB file.
'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\testhost.x86.exe'. Cannot find or open the PDB file.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CoreUtilities.dll'. Cannot find or open the PDB file.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.PlatformAbstractions.dll'. Cannot find or open the PDB file.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll'. Cannot find or open the PDB file.
'testhost.x86.exe' (CLR v4.0.30319: testhost.x86.exe): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.TestPlatform.CrossPlatEngine.dll'. Cannot find or open the PDB file.

...

'QTAgent32_40.exe' (CLR v4.0.30319: TestAppDomain: 0bb1983f-0f53-41cc-b4ed-143874102a64): Unloaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\TESTPLATFORM\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel.dll'
'QTAgent32_40.exe' (CLR v4.0.30319: TestAppDomain: 0bb1983f-0f53-41cc-b4ed-143874102a64): Unloaded 'C:\VST\CodedUITestProject2\TestResults\abcdef_X#XXX## 2017-12-05 11_05_06\Out\CodedUITestProject2.dll'
The thread 0x1860 has exited with code 0 (0x0).
The thread 0x1dcc has exited with code 0 (0x0).
Exception thrown: 'System.Threading.ThreadInterruptedException' in mscorlib.dll
The thread 0x1cb0 has exited with code 0 (0x0).
The thread 0x2d54 has exited with code 0 (0x0).
The thread 0x2a40 has exited with code 0 (0x0).
The thread 0x1e04 has exited with code 0 (0x0).
The program '[8104] QTAgent32_40.exe: Program Trace' has exited with code 0 (0x0).
The thread 0x1714 has exited with code 0 (0x0).
The thread 0x265c has exited with code 0 (0x0).
The program '[8104] QTAgent32_40.exe' has exited with code 0 (0x0).
The thread 0x2d9c has exited with code 0 (0x0).
The thread 0xde4 has exited with code 0 (0x0).
The thread 0x3bc has exited with code 0 (0x0).
The thread 0x253c has exited with code 0 (0x0).
The program '[12012] testhost.x86.exe: Program Trace' has exited with code 0 (0x0).
The program '[12012] testhost.x86.exe' has exited with code 0 (0x0).

I've tried repaving Visual Studio and installing the latest bits, etc. to no avail. And I'm experiencing this issue on two different machines.

Refer to this Stack Overflow post.

解决方案

Hi Calvin,

Thank you for posting in MSDN forum.

This forum is discussing Visual Studio Setup and Installation, since your issue related to code UI test, I help you move this case to this forum to get a better help.

Thanks for your understanding

Best Regards,


这篇关于如何在VS 2017中安装Coded UI组件,以便调试工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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