Could not load type 'System.Runtime.Remoting.Channels.IChannel'
See original GitHub issueI 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:
- Created 2 years ago
- Comments:17 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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!