3

nunit-console.exeマップされたネットワーク ドライブから実行しようとすると、次のエラーがスローされます

 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)**

を追加loadFromRemoteSources enabled="true"してみましnunit-console.exe.configたが、問題は解決しませんでした。

4

1 に答える 1

3

これを nunit-console.config ファイルに追加します。

<supportedRuntime version="v4.0"/>

ここからこれを入手しました: 特定のネットワーク共有を完全に信頼できると見なすように.NETを取得します

于 2014-02-18T22:01:47.410 に答える