Visual Studio 2017 .NET核心测试项目未发现测试 [英] Visual Studio 2017 .NET Core Test Project does not discover tests
问题描述
开箱即用的Visual Studio 2017 .NET核心测试项目不起作用。
Right out of the box the Visual Studio 2017 .NET Core Test Project does not work.
已安装的版本:
Microsoft Visual Studio Enterprise 2017
版本15.4.3
VisualStudio.15.Release / 15.4.3 + 27004.2008
Microsoft .NET Framework
版本4.7.02053
Microsoft Visual Studio Enterprise 2017
Version 15.4.3
VisualStudio.15.Release/15.4.3+27004.2008
Microsoft .NET Framework
Version 4.7.02053
要重现:
将新的.NET核心单元测试项目添加到解决方案中。 马上我在输出窗口看到这个:
Add a new .NET Core Unit Test Project to a solution. Right away I am seeing this in the output window:
[11/13/2017 12:41:42 PM信息] PowerShellTestContainerDiscoverer:OnProjectItemChanged
[11/13/2017 12:41:42 PM信息] PowerShellTestContainerDiscoverer:IsTestFile - C:\..\UnitTestProject1 \UnitTest1.cs
[11/13 / 2017年12:42:20信息] ------发现测试开始------
[11/13/2017 12:43:22 PM错误] < span style ="text-decoration:underline">无法初始化客户端代理:无法连接到测试过程。
[11/13/2017 12:43: 22 PM信息] ==========发现测试结束:0找到(0:01:02.0255285)==========
[11/13 / 2017 12:43:46 PM信息] PowerShellTestContainerDiscoverer:OnProjectItemChanged
[11/13/2017 12:41:42 PM Informational] PowerShellTestContainerDiscoverer:OnProjectItemChanged
[11/13/2017 12:41:42 PM Informational] PowerShellTestContainerDiscoverer:IsTestFile - C:\..\UnitTestProject1\UnitTest1.cs
[11/13/2017 12:42:20 PM Informational] ------ Discover test started ------
[11/13/2017 12:43:22 PM Error] Failed to initialize client proxy: could not connect to test process.
[11/13/2017 12:43:22 PM Informational] ========== Discover test finished: 0 found (0:01:02.0255285) ==========
[11/13/2017 12:43:46 PM Informational] PowerShellTestContainerDiscoverer:OnProjectItemChanged
然后我试着运行测试,我得到相同的消息"无法初始化客户端代理:无法连接到测试过程。"
Then any time I try and run the test, I get the same message "Failed to initialize client proxy: could not connect to test process."
需要做什么?
Bill Behning
Bill Behning
推荐答案
执行新的Out of the Box .NET Core控制台应用程序时,我也遇到了这个错误。
I'm also getting this error when executing a new Out of the Box .NET Core console application.
您的应用已进入中断状态,但当前没有代码正在执行所选调试引擎支持(例如只有本机运行时代码正在执行)。
Your app has entered a break state, but no code is currently executing that is supported by the selected debug engine (e.g. only native runtime code is executing).
dotnet.exe中0x00007FF8617E0542(coreclr.dll)的未处理异常:0xC0000005:访问冲突读取位置0x0000000000000000。发生
Unhandled exception at 0x00007FF8617E0542 (coreclr.dll) in dotnet.exe: 0xC0000005: Access violation reading location 0x0000000000000000. occurred
这篇关于Visual Studio 2017 .NET核心测试项目未发现测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!