简体   繁体   English

System.AddIn AddInView程序集强名称问题

[英]System.AddIn AddInView assembly strong name issue

I've built up an application that works using the System.AddIn APIs. 我已经建立了一个使用System.AddIn API的应用程序。 Add-ins are currently activated in an external AppDomain with Internet trust. 加载项当前在具有Internet信任的外部AppDomain中被激活。

In order to improve performance I've added strong names to all my pipeline components. 为了提高性能,我为所有管道组件添加了强名称。 However as soon as I did this I get the following exception when trying to activate my add-in: 但是,一旦这样做,我在尝试激活加载项时会收到以下异常:

System.Security.SecurityException: That assembly does not allow partially trusted callers. System.Security.SecurityException:该程序集不允许部分受信任的调用方。

Looking at the fusion logs the error messages indicate this is due to the AddInView assembly not allowing partially trusted callers. 查看融合日志,错误消息表明这是由于AddInView程序集不允许部分受信任的调用方引起的。 However, I've added the [assembly: AllowPartiallyTrustedCallers] attribute to the assembly. 但是,我已经将[assembly:AllowPartiallyTrustedCallers]属性添加到了程序集。 The only assemblies AddInView references are: 仅有的程序集AddInView引用是:

  1. System. 系统。
  2. System.AddIn System.AddIn
  3. System.AddIn.Contract System.AddIn.Contract

Any ideas how to resolve this issue? 任何想法如何解决这个问题?

I think you need to add the 我认为您需要添加

[assembly:AllowPartiallyTrustedCallers]

attribute to the AddInView and the AddInViewAdapters assemblies. 属性设置为AddInView和AddInViewAdapters程序集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM