Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/259.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Nunit加载项未显示在Nunit的加载项列表中_C#_Nunit_Automated Tests_Nunit 2.5 - Fatal编程技术网

C# Nunit加载项未显示在Nunit的加载项列表中

C# Nunit加载项未显示在Nunit的加载项列表中,c#,nunit,automated-tests,nunit-2.5,C#,Nunit,Automated Tests,Nunit 2.5,我在为nunit创建插件时遇到问题。我想我已经完成了必要的步骤,但是由于某些原因,我没有在nunit工具插件列表中看到我创建的插件。我用c创建了一个新项目,并从nunit安装目录中引用了nunit.core和nunit.core.interfaces。然后我构建它并通过dll复制到addins目录中 这是我的班级: using System; using System.Text; using NUnit.Core.Extensibility; using NUnit.Core; [NUnit

我在为nunit创建插件时遇到问题。我想我已经完成了必要的步骤,但是由于某些原因,我没有在nunit工具插件列表中看到我创建的插件。我用c创建了一个新项目,并从nunit安装目录中引用了nunit.core和nunit.core.interfaces。然后我构建它并通过dll复制到addins目录中

这是我的班级:

using System;
using System.Text;
using NUnit.Core.Extensibility;
using NUnit.Core;


[NUnitAddinAttribute(Type = ExtensionType.Core, Name = "Test Addin", Description = "A test addin.")]
public class CTestingAddin : IAddin, EventListener
{
    #region IAddin Members

    public bool Install(IExtensionHost host)
    {
        IExtensionPoint listeners = host.GetExtensionPoint("EventListeners");
        if (listeners == null)
            return false;

        listeners.Install(this);
        return true;
    }

    #endregion

    #region EventListener Members

    public void RunStarted(string name, int testCount)
    {
    }

    public void RunFinished(Exception exception)
    {
    }

    public void RunFinished(TestResult result)
    {
    }

    public void SuiteFinished(TestResult result)
    {
    }

    public void SuiteStarted(TestName testName)
    {
    }

    public void TestFinished(TestResult result)
    {
    }

    public void TestOutput(TestOutput testOutput)
    {
    }

    public void TestStarted(TestName testName)
    {
        Console.WriteLine("EVENTLISTENER: Test has started");
    }

    public void UnhandledException(Exception exception)
    {
    }

    #endregion
}
当我打开nunit时,我在插件中没有看到任何东西。有什么想法可以阻止我看到这个插件并加载它


谢谢,我找到了答案。显然,eventlistener没有出现在插件中,我只是运行了我的测试,它正在运行我的侦听器,即使它没有出现在插件中。

我找到了答案。显然,eventlistener没有出现在插件中,我只是运行了测试,它正在运行我的listener,即使它没有出现在插件中。

我也经历了同样的情况。有人知道这是什么原因吗?还是一个错误?我也有同样的经历。有人知道这是什么原因吗?还是一个bug?