gpt4 book ai didi

nunit-console - NUnit.ConsoleRunner.Runner "System.Security.SecurityException: That assembly does not allow partially trusted callers"

转载 作者:行者123 更新时间:2023-12-02 00:01:24 26 4
gpt4 key购买 nike

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

我尝试在 nunit-console.exe.config 中添加 loadFromRemoteSources enabled="true",但这并没有解决问题。

最佳答案

将其添加到 nunit-console.config 文件中。

<supportedRuntime version="v4.0"/>

从这里得到这个: Get .NET to consider a specific network share to be fully trusted :

关于nunit-console - NUnit.ConsoleRunner.Runner "System.Security.SecurityException: That assembly does not allow partially trusted callers",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21237110/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com