3

nunit-console.exe throws the following error while i tried to execute from Mapped Network Drive

 Unhandled Exception: System.TypeInitializationException: The type initializer for 'NUnit.ConsoleRunner.Runner' threw an exception. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers.
     at NUnit.ConsoleRunner.Runner..cctor()
  The action that failed was:
  LinkDemand
  The assembly or AppDomain that failed was:
  nunit-console-runner, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77
  The method that caused the failure was:
  NUnit.Core.Logger GetLogger(System.Type)
  The Zone of the assembly that failed was:
  Internet
  The Url of the assembly that failed was:
  file:///Z:/jenkinsworkspace/workspace/FlashUpload/tools/NUnit/lib/nunit-console-runner.DLL
     --- End of inner exception stack trace ---
     at NUnit.ConsoleRunner.Runner.Main(String[] args)
     at NUnit.ConsoleRunner.Class1.Main(String[] args)**

I tried adding loadFromRemoteSources enabled="true" in nunit-console.exe.config, but that did not solve the problem.

nandhp
  • 4,680
  • 2
  • 30
  • 42
Ravivarman
  • 61
  • 4
  • possible duplicate of [Get .NET to consider a specific network share to be fully trusted](http://stackoverflow.com/questions/4163615/get-net-to-consider-a-specific-network-share-to-be-fully-trusted) – Denis Feb 18 '14 at 22:03

1 Answers1

3

Add this to the nunit-console.config file.

<supportedRuntime version="v4.0"/>

Got this from here: Get .NET to consider a specific network share to be fully trusted:

Community
  • 1
  • 1
Denis
  • 11,796
  • 16
  • 88
  • 150