Как добавить надстройку в тестовую бета-версию 7C#

Место общения программистов C#
Ответить
Anonymous
 Как добавить надстройку в тестовую бета-версию 7

Сообщение Anonymous »

У меня есть проект .NET 4.8 с пакетами nunit4 со следующим кодом:

Код: Выделить всё

using System.IO;
using NUnit.Engine;
using NUnit.Engine.Extensibility;

namespace Learning.NUnitInterface
{
[Extension(Description = "My Test Listener", Path = "EventListeners")]
public class MyTestListener : ITestEventListener
{
public MyTestListener()
{
try
{
//Directory.CreateDirectory(@"C:\temp");
//File.WriteAllText(@"C:\temp\addin_loaded.txt", "Loaded");
}
catch
{
// ignore errors
}
}
public void OnTestEvent(string report)
{

}
}
}
У меня есть nunit.engine.api и nunit.engine.dll (3.16.1)
Внутри папки TestCentric.GuiRunner.2.0.0-beta7\tools я добавил файл Extensibility.addins и введите внутри: Extensions/ClassLibrary3/tools/*.dll
Когда я запускаю testcentric.exe я получаю сообщение об ошибке ссылки на объект.
в журнале (InternalTrace.27864) я получаю сообщение об ошибке:

Код: Выделить всё

4:54:34.414 Debug [ 1] ExtensionManager:   Type:  - not an extension
14:54:34.414 Info  [ 1] ExtensionManager:   Type: MyTestListener - found ExtensionAttribute
14:54:34.418 Error [ 1] ServiceManager: Failed to initialize ExtensionService
14:54:34.421 Error [ 1] ServiceManager: System.NullReferenceException: Object reference not set to an instance of an object.
14:54:34.409 Info  [ 1] ExtensionManager:   Assembly: ClassLibrary3.dll
14:54:34.414 Debug [ 1] ExtensionManager:   Type:  - not an extension
14:54:34.414 Info  [ 1] ExtensionManager:   Type: MyTestListener - found ExtensionAttribute
14:54:34.418 Error [ 1] ServiceManager: Failed to initialize ExtensionService
14:54:34.421 Error [ 1] ServiceManager: System.NullReferenceException: Object reference not   set to an instance of an object.
at TestCentric.Extensibility.ExtensionManager.FindExtensionsInAssembly(ExtensionAssembly   extensionAssembly)
at TestCentric.Extensibility.ExtensionManager.FindExtensions(String startDir)
at TestCentric.Engine.Services.ExtensionService.StartService()
at TestCentric.Engine.Services.ServiceManager.StartService(IService service)
В чем проблема?

Подробнее здесь: https://stackoverflow.com/questions/798 ... ric-beta-7
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»