FileLoadException 和强程序集签名
我有一个引用其他几个程序集的程序集。一切都很顺利,然后我继续并强烈签署了所有程序集。该程序集包含实体设计器以及生成的实体和上下文对象。现在,设计器中所做的任何更改都会导致错误,而且我无法摆脱它。下面列出了错误。任何帮助将不胜感激。
错误 1 无法解析程序集引用。路径“C:\Windows\Microsoft.Net\ assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll”必须位于此计算机的本地路径或受信任区域的一部分。如果您已下载此模板,则可能需要使用 Windows 资源管理器中模板文件的属性页来“取消阻止”它。
错误 2 加载程序集 'C:\Windows\Microsoft.Net\ assembly\GAC_32 时出现问题\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'
错误 3 加载程序集时出现问题“C:\ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System.Data.Entity \ v4.0_4.0.0.0__b77a5c561934e089 \ System.Data.Entity.dll”
错误4加载程序集时出现问题“C:\ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System.Xml \ v4.0_4.0.0.0__b77a5c561934e089 \ System.Xml.dll”
错误5加载程序集时出现问题'C:\Windows\Microsoft.Net\ assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'
错误 2-5 的错误和堆栈跟踪类似于: 抛出以下异常: System.IO.FileLoadException:无法加载文件或程序集'file:///C:\ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System.Data.Entity \ v4.0_4.0.0.0__b77a5c561934e089 \ System.Data.Entity .dll' 或其依赖项之一。不支持操作。 (HRESULT 异常:0x80131515) 文件名:'file:///C:\Windows\Microsoft.Net\ assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll' ---> System.NotSupportedException:尝试从网络位置加载程序集,这会导致程序集在早期版本的 .NET Framework 中被沙箱化。此版本的 .NET Framework 默认情况下不启用 CAS 策略,因此此负载可能很危险。如果该负载不打算用于
I have an assembly which is referencing couple of other assemblies. Everything was working fine and then I went ahead and strongly signed all of the assemblies. The assembly contains entity designer and generated entities and context objects. Now any change made in the designer results in error and I can't get rid of it. The errors are listed below. Any help would be much appreciated.
Error 1 Failed to resolve assembly reference. The path 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll' must be either local to this computer or part of your trusted zone. If you have downloaded this template, you may need to 'Unblock' it using the properties page for the template file in Windows Explorer..
Error 2 There was a problem loading the assembly 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'
Error 3 There was a problem loading the assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll'
Error 4 There was a problem loading the assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'
Error 5 There was a problem loading the assembly 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'
The error and stack trace for errors 2-5 are similar like:
The following Exception was thrown:
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Data.Entity.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to s
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论