Visual Studio NUnit不运行我的单元测试;显示测试适配器丢失,但我确实安装了它

xytpbqjk  于 2023-03-19  发布在  其他
关注(0)|答案(3)|浏览(180)

我有一个包含NUnit测试项目的C#解决方案。此项目拒绝运行任何测试;发现时发现了这些错误,但在输出窗口中出现了以下错误(以及其他错误):

The active test discovery was aborted. Reason: Test host process crashed
========== Test discovery aborted: 0 Tests found in 1.9 sec ==========
---------- Resuming previously aborted test discovery ----------
Test project Tests does not reference any .NET NuGet adapter. Test discovery or execution might not work for this project.

现在我确实添加了那个引用(NUnit 3 TestAdapter),但是我仍然看到这个错误。这是怎么回事?为什么我的测试不能运行?提前感谢!:)

2ledvvac

2ledvvac1#

有同样的问题。在UnitTest项目中安装'NUnit3TestAdapter' nuget包为我修复了这个问题。

bwntbbo3

bwntbbo32#

确保在测试项目中引用了“nunit.framework.dll

ego6inou

ego6inou3#

您需要安装xunit.runner.visualstudio包

相关问题