agent-net-nunit
agent-net-nunit copied to clipboard
Problem with nunit-console runner
Hi, I'm trying to run tests using nunit-console. Using ReportPortal.Nunit 4.5, nunit-console 3.16.3, .Net 6. I also added the addins file to the nunit-console folder as described in the tutorial. Tests are run from the Visual Studio Test Explorer, and they are all logged into the Report Portal. But through nunit-console it gives an error all the time. _
System.Reflection.TargetInvocationException : ?. ----> System.TypeInitializationException : ? "ReportPortal.NUnitExtension.ReportPortalListener" ????? ??????????. ----> System.IO.FileNotFoundException : ?? ??????? ????????? ???? ??? ?????? "System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" ???? ???? ?? ?? ????????????. ?? ??????? ????? ????????? ????. --TargetInvocationException System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) TypeInitializationException "ReportPortal.NUnitExtension.ReportPortalListener" ????? ??????????. ? ReportPortal.NUnitExtension.ReportPortalListener..ctor() FileNotFoundException ???? "System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" . ? ReportPortal.NUnitExtension.ReportPortalListener..cctor()
Could you help what could be wrong
Right, hell of internal dependencies and frameworks.
It works with netcore version of nunit console runner: https://github.com/nunit/nunit-console/releases/tag/3.16.3 NUnit.ConsoleRunner.NetCore.3.16.3.nupkg
Then I executed:
dotnet nunit3-netcore-console.dll ..\test\bin\Debug\net6.0\test.dll
Leaving this issue open to improve our docs. Related to #89
PS: I recommend to use dotnet test
, no need to download nunit console at all.