nunit / nunit-console

NUnit Console runner and test engine
MIT License
212 stars 149 forks source link

NUnit Console and NUnit Console Runner version 3.17.0 error when running tests vis command line on Mac #1387

Open Moshex opened 4 months ago

Moshex commented 4 months ago

When running this command on NUnit Console and NUnit Console Runner version 3.17.0:

mono ../../../.nuget/packages/NUnit.ConsoleRunner/3.17.0/tools/nunit3-console.exe --labels=Before --out=TestResult.txt "--result=TestResult.xml;format=nunit2" ./project.csproj --trace=Verbose;

I get the following error:

Error : /Users/{username}/Documents/project/project/bin/Debug/net6.0/project.dll
System.ArgumentException : The netcore-6.0 framework is not available.
Available frameworks: mono-4.0
--ArgumentException
The netcore-6.0 framework is not available.
Available frameworks: mono-4.0
  at NUnit.Engine.Services.TestAgency.GetAgent (NUnit.Engine.TestPackage package) [0x0008e] in <98a5d354480145bf8bc83cc74d63f414>:0 
  at NUnit.Engine.Runners.ProcessRunner.CreateAgentAndRunnerIfNeeded () [0x0003d] in <98a5d354480145bf8bc83cc74d63f414>:0 
  at NUnit.Engine.Runners.ProcessRunner.RunTests (NUnit.Engine.ITestEventListener listener, NUnit.Engine.TestFilter filter) [0x0001f] in <98a5d354480145bf8bc83cc74d63f414>:0 

When I downgrade to NUnit Console and NUnit Console Runner version 3.16.3 This error does not occur and the command works as expected.

Is there a change that I need to make for NUnit Console and NUnit Console Runner version 3.17.0? Thank you for any information!

OsirisTerje commented 4 months ago

We have not ported all fixes from the 3.16 branch yet, so it might be one of those that prevents this. The 3.17 comes off the 3.15, and the 3.16 has some other issues (crashes) we want to avoid.

And, we lack human resources to speed these fixes up.

Moshex commented 4 months ago

okay, thanks for the heads up!

Moshex commented 4 months ago

@OsirisTerje After a little more testing it seems the only version in the Nunit.Console and Nunit.ConsoleRunner that works is version 3.16.3, so I am guessing there is a fix in that version for this compared to version 3.16.2. That may help in the next version of 3.17. I hope this helps!

OsirisTerje commented 3 months ago

@Moshex If you have the time to figure out which change that may be , we can get it over. It is "Just" some detective work ;-)

Moshex commented 1 month ago

@OsirisTerje My guess based off the error is it would be this fix: https://github.com/nunit/nunit-console/pull/1317

but it could be: https://github.com/nunit/nunit-console/issues/1307

Bartleby2718 commented 1 month ago

@OsirisTerje Could you take a look at the linked PR please?