. net框架如何确定区域

本文关键字:区域 何确定 框架 net | 更新日期: 2023-09-27 18:14:41

我得到了以下错误,但我很困惑为什么。net认为这个DLL位于互联网区域,而显然它是在内部网上。什么好主意吗?

下面是NUNIT抛出的错误:
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.5.7.10213, 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://fs1/pc/Tools/dlls/NUnit/NUnit/bin/net-2.0/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)

. net框架如何确定区域

Windows "记得"文件来自哪里。

如果我正确理解了错误,那就是从互联网下载的Nunit dll失败了。

进入windows资源管理器,选择该文件的属性。在常规选项卡的底部应该有一个按钮,您可以按下它来确认它是安全的。