简体   繁体   English

Visual Studio 2010中的旧版安全策略和COM参考

[英]Legacy Security Policy in Visual Studio 2010 and COM References

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. 我有一个使用DevExpress 8.3(2008.3)的项目,我最近刚升级到使用VS 2010.这样做之后,一切都编译得很好,但我试图使用设计器时遇到错误。 I resolved this as described here: NetFx40_LegacySecurityPolicy in design-time mode 我按照此处的描述解决了这个问题: 设计时模式下的NetFx40_LegacySecurityPolicy

by adding <NetFx40_LegacySecurityPolicy enabled="true"/> to my devenv.exe.config. 通过将<NetFx40_LegacySecurityPolicy enabled="true"/>到我的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: Designer现在工作正常,但解决方案中有一些COM引用的项目不再编译,例外情况如下:

The "ResolveComReference" task could not be instantiated from "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". 无法从“Microsoft.Build.Tasks.v4.0,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a”实例化“ResolveComReference”任务。 The security state of an AppDomain was modified by an AppDomainManager configured with the NoSecurityChanges flag. AppDomain的安全状态由配置了NoSecurityChanges标志的AppDomainManager修改。

The COM references for those projects are also flagged with a yellow exclamation mark. 这些项目的COM引用也标有黄色感叹号。

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 我发现此错误的唯一谷歌搜索结果如下: 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). 我登录了我的DX帐户,发现(令我惊讶的是)DX正在向我提供升级到同一版本2008.3的新修补程序版本(即使我的订阅已过期)。 This fixed the problem (and allowed me not to have to use Legacy Security Policy at all). 这解决了问题(并且允许我根本不必使用传统安全策略)。

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

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