question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.TypeLoadException nunit3-console 3.8

See original GitHub issue

I have my test file using NUnit 3.10.1

Here’s the output I’m receiving after running nunit3-console.exe

NUnit Console Runner 3.6.0
Copyright (C) 2017 Charlie Poole

Runtime Environment
   OS Version: Microsoft Windows NT 10.0.16299.0
  CLR Version: 4.0.30319.42000

Test Files
    .\dll_test.dll


Unhandled Exception: NUnit.Engine.NUnitEngineException: Failed to start remote test agent.
   at NUnit.Engine.Services.TestAgency.OnAgentExit(Object sender, EventArgs e)
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)
System.TypeLoadException: Could not load type 'NUnit.Engine.NUnitEngineUnloadException' from assembly 'nunit.engine.api, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb'.
   at NUnit.Engine.Runners.ProcessRunner.Dispose(Boolean disposing)
   at NUnit.Engine.Runners.AbstractTestRunner.Dispose()
   at NUnit.Engine.Runners.MasterTestRunner.Dispose(Boolean disposing)
   at NUnit.Engine.Runners.MasterTestRunner.Dispose()
   at NUnit.ConsoleRunner.ConsoleRunner.RunTests(TestPackage package, TestFilter filter)
   at NUnit.ConsoleRunner.Program.Main(String[] args)
PS C:\Users\eyang\Documents\Work\Demonstration\dll_test\dll_test\bin\x64\Debug>

I found this thread (https://github.com/nunit/nunit/issues/1348) but it did not help much.

Cheers!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
reckfacecommented, Mar 19, 2019

I also get this error: System.TypeLoadException: Method 'get_TargetFramework' in type 'NUnit.Engine.Extensibility.ExtensionNode' from assembly 'nunit.engine, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' does not have an implementation. This occurs when I’m using Nunit3TestAdapter 3.13.0. However, when I use version 3.11.2, all my tests work fine.

1reaction
spring1975commented, Mar 22, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.TypeLoadException nunit3-console 3.8
I have my test file using NUnit 3.10.1. Here's the output I'm receiving after running nunit3-console.exe NUnit Console Runner 3.6.0 ...
Read more >
Console and Engine Release Notes
NUnit Console 3.8 - January 27, 2018. This release includes several fixes when unloading AppDomains and better error reporting. The aggregate NuGet packages ......
Read more >
Chocolatey Software | NUnit 3 Console Runner 3.8.0
System.TypeInitializationException : The type initializer for 'NUnit.Engine.Services.RuntimeFrameworkService' threw an exception. ----> System.ComponentModel.
Read more >
NUnit3 throws exception System.Runtime, Version=4.2.0.0 ...
But when I try to run the test cases from console runner like below I get exception saying System.Runtime, Version=4.2.0.0 assembly not found....
Read more >
NUnit Tests Not Running
System.TypeLoadException: Method 'get_AssemblyPath' in type 'NUnit.Engine.Extensibility.ExtensionNode' from assembly 'nunit.engine, Version=3.10 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found