nunit3-vs-adapter: Could not load type 'System.Runtime.Remoting.Channels.IChannel'
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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (6 by maintainers)
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!
@OsirisTerje Invited you to the private repo.