Visual Studio (Mac) .NET Standard 1.4 NUnit assembly resolution failure -
i have problems running nunit tests on visual studio (mac) preview 5 (7.0 build 1659).
the dummy solution contains 2 projects:
- library1 targets .netstandard1.4
- library2tests build .net framework 4.6.1
in library1 project there classes:
public abstract class authorizationcontext { protected abstract httpmessagehandler createhandler(); } public class windowsauthorizationcontext : authorizationcontext { protected override httpmessagehandler createhandler() { return new httpclienthandler(); } }
in simple test fixture reference these:
[testfixture] public class test { private authorizationcontext testcontext; [setup] public void setup() { testcontext = new windowsauthorizationcontext(); } [teardown] public void teardown() { testcontext = null; } [test] public void testcase() { } }
the solution builds fine, unit test fails following error message:
system.typeloadexception : not load type 'library1.windowsauthorizationcontext' assembly 'library1, version=1.0.0.0, culture=neutral, publickeytoken=null'.
if remove createhandler method , implementation, test runs fine.
somehow, unit test runtime cannot resolve system.net.http assembly.
what missing here?
here sample solution
Comments
Post a Comment