https://stackoverflow.com/questions/52835507/does-net-core-work-with-nunit-console-runner
I have a very simple project (.NET CORE 2.1) with one test. I run the console (3.9) and get this error
NUnit.Engine.NUnitEngineException : The NUnit 3 driver encountered an error while executing reflected code.
----> System.InvalidCastException : Unable to cast transparent proxy to type 'System.Web.UI.ICallbackEventHandler'.
--NUnitEngineException
The NUnit 3 driver encountered an error while executing reflected code.
NUnit Console is compiled using the full .NET Framework and does not currently support .NET Core. To run .NET Core tests from the command line, you need to use dotnet test. For info on how to do this, see https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard
We are looking at creating a .NET Core based console runner, but it is still in the planning stages.
We are also about to migrate our product platform to .Net Core and investigate the necessary actions for our NUnit2-based tests.
A .Net Core based console runner would be highly appreciated.
Any coarse timeline available?
Thank you, I appreciate you getting back to me. I will see if I can get the CLI installed on my Jenkins Virtuals.
@z002Holpp, you don't need to wait for a console runner from us, you can use dotnet test on the command line now with NUnit. A console runner will just add features that are not available currently in the .NET Core test runner. See my link above for more info...
We are looking at creating a .NET Core based console runner, but it is still in the planning stages.
Are there any news regarding a .Net Core based console runner? We are in the phase of migrating some huge NUnit-3 based projects to .Net Core and are waiting urgently for a Core based runner.
@z002Holpp, you don't need to wait for a console runner from us, you can use
dotnet teston the command line now with NUnit. A console runner will just add features that are not available currently in the .NET Core test runner. See my link above for more info...
Hi @rprouse !
Does it mean that NUnit Engine extensions like event listeners won't work when using dotnet test command?
@elv1s42 I think event listeners will work with the latest version of the engine, but to be honest, I haven't tested it. If you do, please report back 馃槈
Hi @rprouse,
I've tried to run tests using dotnet test command and faced some issues:
<IsTestProject>true</IsTestProject> https://github.com/dotnet/sdk/issues/2690I have one question regarding the way NUnit Engine discovers the addins. Am I right that it uses this pattern (https://github.com/nunit/nunit-console/blob/master/nuget/engine/nunit.nuget.addins) to locate addins?
Can't find any way to override this file.
@elv1s42 sorry, I've been away and missed your response. The easiest way to add additional addins is to create them as a NuGet package. The engine will look at other installed NuGet packages with the form NUnit.Extension.* and look for addins in the tools directory of the NuGet Package. It's easiest to look at an existing extension.

Be aware that extensions for .NET Core are still very new and not well tested, so we'd appreciate feedback. We consider them a work in progress.
@rprouse HI. I have a .netcore nunit test project.I want to implement nunit event listeners in my test project .
Please can you elaborate more on the above screenshot which you have send.
Can you tell me the steps.I have written nunit3 event listener. I want to know how can the nunit3 event listener be found and triggered when i run .netcore test .
@upretyrohan the screenshot is the file layout of another NUnit extension NuGet package. Notice that
tools directory in the NuGet packageaddins file that tells NUnit which DLL to load as the extensionnunit.extension.* so that it will be found by the engine.The addins file only contains one line specifying the DLL to load as the extension,
nunit.v2.driver.dll
Hi @rprouse ,
Thank you for the reply and sorry for late response.
Am I right that the approach you mentioned is related to NUnit Adapter too?
This is the issue I'm talking about:
https://github.com/nunit/nunit3-vs-adapter/issues/222
How will NUnit Test Adapter find the extensions starting from the latest release?
The NUnit Adapter uses the engine, so when it finally supports extensions, they will be found in the same way.
Thank you @rprouse , I'll try the recommended approach for both .NET Framework and .NET Core versions. basically I want to able to install the extension package and start using it without any additional actions (like manual modifications to .addins files).
Team - when can we expect Nunit Console Runner to support DotNet Core.
@ramgkn Please see https://github.com/nunit/nunit-console/issues/475 for tracking on this.
@ChrisMaddock - thank you for sharing the thread related to console runner.
With Vstest or DotNet exe - i am able to execute the test cases; however,
Most helpful comment
NUnit Console is compiled using the full .NET Framework and does not currently support .NET Core. To run .NET Core tests from the command line, you need to use
dotnet test. For info on how to do this, see https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-StandardWe are looking at creating a .NET Core based console runner, but it is still in the planning stages.