nUnit无法加载,使用版本3.11 [英] NUnit failed to load, using version 3.11

查看:33
本文介绍了nUnit无法加载,使用版本3.11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我降低到3.10时,它可以工作,但不确定为什么最新停止。我尝试的所有东西都不起作用。

这是输出中显示的内容。我尝试了网上找到的许多选项,但似乎都无济于事:

[13/03/2019 17:10:44 Informational] ------ Run test started ------
[13/03/2019 17:10:45 Informational] NUnit Adapter 3.13.0.0: Test execution started
[13/03/2019 17:10:45 Informational] Running all tests in E:xxxxxxxxx.TestsinDebugxxx.Tests.dll
[13/03/2019 17:10:45 Informational]    NUnit failed to load E:xxxxxxxxx.xxxinDebugxxx.Tests.dll
[13/03/2019 17:10:45 Informational] NUnit Adapter 3.13.0.0: Test execution complete
[13/03/2019 17:10:45 Warning] No test matches the given testcase filter `FullyQualifiedName=xxx.xxx.xxxTestss.xxxxnameshouldbesomething` in E:xxxxxxxxx.TestsinDebugxxx.Tests.dll
[13/03/2019 17:10:45 Informational] ========== Run test finished: 0 run (0:00:01.6716706) ==========

我也创建了一个基本测试进行确认,此处:

Imports NUnit.Framework
Imports Should

<TestFixture()>
Public Class UnitTest1

    <Test()> Public Sub TestMethod1()
        Dim b As Boolean = False
        b.ShouldBeFalse
    End Sub

End Class

我尝试删除TestFixture,将其重命名为TestClass(但我需要使用NUnit!)

太奇怪了.我的解决方案中有一个确实有效的项目,而且我找不到任何差异,这对我没有任何帮助。

我甚至尝试创建一个新的空项目.但这在任何版本的NUnit上都不起作用(但我想我会将其作为一个单独的问题提出)。

本地

发现问题,由于某些原因,我的项目的Microsoft.VisualStudio.QualityTools.UnitTestFramework标志"Copy推荐答案"设置为False。

当我将其更改为true时,现在可以开始并运行我的测试:)

3.10版似乎不需要此功能,这就是为什么在降低版本时,它再次开始工作。

(我认为设置此标志不会影响本地运行)

这篇关于nUnit无法加载,使用版本3.11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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