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.

Could not load type 'System.Runtime.Remoting.Channels.IChannel'

See original GitHub issue

I get this error when I run dotnet test MyTestProject.csproj Tests run fine from Visual Studio.

An exception occurred while invoking executor 'executor://nunit3testexecutor/': Could not load type 'System.Runtime.Remoting.Channels.IChannel' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

NUnit Version=“3.13.1” NUnit3TestAdapter Version=“3.17.0”

dotnet --version 5.0.201

Tests project targets netcoreapp3.1. Didn’t work with net5.0 either.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
pmaytakcommented, Jul 12, 2022

I also got the same error with similar project structure as described above. A fix that worked for me was to add an explicit reference to the test adapter package in my top level project.

1reaction
Giorgicommented, Apr 7, 2021

I deleted the packages folder, deleted all bin/obj folders in the solution, removed the extra imports and it now works without any issues. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Testrun wont start in VS2019 correctly
The message I get is: Ausnahme beim Aufrufen von Executor "executor://nunit3testexecutor/": Could not load type 'System.Runtime.Remoting.
Read more >
IChannel Interface (System.Runtime.Remoting.Channels)
Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to...
Read more >
Could not load type 'System.Runtime.Versioning ... - YouTrack
System.TypeLoadException : Could not load type 'System.Runtime.Versioning. ... Server stack trace: at System.Runtime.Remoting.Channels.Ipc.IpcP.
Read more >
IClientChannelSinkProvider Interface (System.Runtime. ...
Creates client channel sinks for the client channel through which remoting messages ... Namespace: System.Runtime.Remoting.Channels. Assembly: mscorlib.dll.
Read more >
NUnit exception occurred while test discoverer was loading ...
The result of this is that the tests aren't visible and you can't run them. The solution to this is to locate the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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