-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.TypeLoadException nunit3-console 3.8 #424
Comments
You've said you're using nunit console 3.8 - but your output shows you're running in console 3.6. I suspect you may have two different versions installed side by side or something, and that's causing the confusion? How are you running you tests - do you have the console installed both via the msi, and as a NuGet package or anything? Where does the 3.8 version come from? I suggest you have a dig around down that line of enquiry. 🙂 |
Closing this, as there's not enough information to understand/reproduce the problem. Happy to reopen if anyone has more to add. 🙂 |
I encountered similar issue and it's 3.8 shown in log, not 3.6 ;)
I have following NUnit packages in my packages.config:
When I downgrade it to 3.9.x - it works correctly. It seems like NUnit.ConsoleRunner 3.8.0 doesn't work with NUnit 3.10.x. |
Hmmm. If you remove the NUnit3TestAdapter package, and clean and rebuild, does it work? I'm wondering if this is caused by two different version of the ending being involved. The framework version shouldn't affect this at all however - did you also update the adapter at the same time? |
Yes, seems like NUnit3TestAdapter is causing it. Either removing it or leaving it downgraded to 3.9 version - then Console runner 3.8.0 works with NUnit 3.10.x. |
I'd guess this is caused because the NUnit3TestAdapter is referencing NUnit.Engine 3.7, and the Console is referencing NUnit.Engine 3.8. Looks like with wrong dll is being hit somewhere. |
For anyone as clumsy as I am .... I just saw a similar problem, due to my error. Not an NUnit issue. I found I had named 2 assemblies the same: Actually reading the long qualified names made it clear that the method under test was being sought in the unit test assembly. |
I also get this error: |
@reckface are you getting this exception when running the NUnit Console? Which version of the console are you running? Is the console installed to the project as a NuGet package? Do you also have the console installed as an MSI? |
Hi, I ran into the same problem and @reckface's solution worked for me. Downgrading Nunit3TestAdaptor from 3.13.0 to 3.11.2 didn't result in the he mentioned above. I installed the Nunit3TestAdaptor as a NuGet package. |
I just ran into this on one computer, but not another running tests in ReSharper's test sessions window. I noticed running the tests from the VS Test explorer window, there was no error. I did get the same results downgrading Nunit3TestAdaptor 3.13.0 to 3.11.2. They started working again in ReSharper's test window. So I upgraded to ReSharper 2018.3.4 on the machine it was failing and reverted back to the TestAdapter 3.13.0. Problem gone. |
I had the same error as @reckface, and re-installing the TestAdapter and upgrading R#, just as @spring1975 said, did the trick. |
I get the following similair exception with packages installed from NuGet
EDIT: I've downgraded the NUnit3TestAdapter to v3.13.0 and the exception is gone. Any version above v3.13.0 produces this exception. Ah and I want to mention, that I run the tests with Resharpers (2020.1.4) built-in test explorer. |
I think this bug has been correctly diagnosed in #800. I'm going to close this issue as a duplicate of that one. |
I have my test file using NUnit 3.10.1
Here's the output I'm receiving after running nunit3-console.exe
I found this thread (nunit/nunit#1348) but it did not help much.
Cheers!
The text was updated successfully, but these errors were encountered: