目标进程退出时未引发 CoreCLR 启动事件 - 尝试在 Visual Studio 中运行基于硒的测试时输出错误

JLe*_*101 5 c# nunit visual-studio specflow

当我尝试在 Visual Studio 中运行自动化测试时,我似乎收到以下错误。我使用的测试提供程序是 SpecFlow.NUnit。有人有什么想法吗?我很困惑... 错误

错误文本:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[19308] testhost.x86.exe: Program Trace' has exited with code 0 (0x0).
The program '[19308] testhost.x86.exe' has exited with code -2147450730 (0x80008096).
Run Code Online (Sandbox Code Playgroud)
  • 我有最新的 2019 版 Visual Studio
  • 目标框架是已安装的.NET Core 2.1

我安装了以下 NuGet 软件包和版本 Specflow NuGet 包 NUnit NuGet 包

Zul*_*kas 4

Stefan Zivkovic 的评论也对我有帮助。我想我会把这个写在一个答案中,充分相信他的建议也对我有帮助。

此外,为了设置您的测试架构:测试菜单选项卡 --> AnyCPU 项目的进程架构 --> x64