传统的安全策略在Visual Studio 2010和COM引用 [英] Legacy Security Policy in Visual Studio 2010 and COM References

查看:573
本文介绍了传统的安全策略在Visual Studio 2010和COM引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用DevEx preSS 8.3(2008.3)的一个项目,我最近刚刚升级到使用VS 2010年这样做之后,一切编译罚款,但我得到的错误尝试使用设计。我解决了这个如下所述: <一href="http://stackoverflow.com/questions/2637089/netfx40-legacysecuritypolicy-in-design-time-mode">http://stackoverflow.com/questions/2637089/netfx40-legacysecuritypolicy-in-design-time-mode

中加入&LT; NetFx40_LegacySecurityPolicy启用=真/&GT; 来我devenv.exe.config

Designer现在工作得很好,但有些在溶液中具有COM引用的项目,不再进行编译,除了:

在ResolveComReference的任务不能从实例化Microsoft.Build.Tasks.v4.0,版本= 4.0.0.0,文化=中性公钥= b03f5f7f11d50a3a。一个AppDomain的安全状态是由配置了NoSecurityChanges标志的AppDomainManager修改。

也被标记为这些项目的COM引用有一个黄色的感叹​​号。

只有谷歌的结果,我发现这个错误是在这里: 的http://social.msdn.microsoft.com/Forums/en/vsx/thread/197b8dca-5610-4ac5-86fc-c56d5182e46b

描述完全相同的问题,但没有解决。我尝试添加

<$p$p><$c$c><GenerateResourceNeverLockTypeAssemblies>true<GenerateResourceNeverLockTypeAssemblies>

作为后建议,但不具有任何影响我。

任何人都知道这事?

感谢。

解决方案

我登录到我的DX的帐户,发现(我惊奇地)发现DX是为我提供一个升级到相同的2008.3发行新的修补程序版本(即使我的订阅过期)。这解决了问题(并让我不要有使用传统安全策略的话)。

I have a project using DevExpress 8.3 (2008.3) which I just recently upgraded to use VS 2010. After doing so, everything compiled fine but I got errors trying to use the designer. I resolved this as described here: http://stackoverflow.com/questions/2637089/netfx40-legacysecuritypolicy-in-design-time-mode

by adding <NetFx40_LegacySecurityPolicy enabled="true"/> to my devenv.exe.config.

Designer works fine now, but some of the projects in the solution which have COM references no longer compile, with the exception:

The "ResolveComReference" task could not be instantiated from "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". The security state of an AppDomain was modified by an AppDomainManager configured with the NoSecurityChanges flag.

The COM references for those projects are also flagged with a yellow exclamation mark.

The only google result I found for this error was here: http://social.msdn.microsoft.com/Forums/en/vsx/thread/197b8dca-5610-4ac5-86fc-c56d5182e46b

which describes the exact same problem but with no resolution. I tried adding

<GenerateResourceNeverLockTypeAssemblies>true<GenerateResourceNeverLockTypeAssemblies>

as the post suggests but that doesn't have any effect for me.

Anyone know anything about this?

Thanks.

解决方案

I logged into my DX account and found (to my surprise) that DX was offering me an upgrade to a new hotfix version of the same 2008.3 release (even though my subscription is expired). This fixed the problem (and allowed me not to have to use Legacy Security Policy at all).

这篇关于传统的安全策略在Visual Studio 2010和COM引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆