NetFx40_LegacySecurityPolicy in design-time mode
Asked Answered
C

1

21

Is there any way to make legacy design-time code execute with NetFx40_LegacySecurityPolicy switched on?

More specificaly, is there any way to make DevExpress 8.2 winforms designer work in VisualStudio 2010?

I got errors due to this issue and found no help about design-time mode, just about run-time:

<runtime>
  <NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>

How should I fix problems with winforms designer?

Croaker answered 14/4, 2010 at 11:56 Comment(2)
I fixed the problem by adding the corresponding attribute to devenv.exe config file, just like to my own application configuration.Croaker
I fixed the problem in ASP.net devEnv adding the atribbute to thee Cassine config in C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe.configSeascape
B
22

Just add this

<NetFx40_LegacySecurityPolicy enabled="true"/>

into your VS2010 DevEnv configuration file, you'll find it in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config

There is a <runtime> section, just copy it at the first place.
I've had the same problem with DevExpress 8.2

If some people face the same problem while developing ASP.Net apps, they should add the Attribute to the Cassini config file placed in C:\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0\WebDev.WebServer40.exe.config

Bedim answered 25/6, 2010 at 14:21 Comment(2)
I'm having the same issue and adding the setting to devenv.exe.config fixed the designer issue, but now I'm getting errors compiling: "The security state of an AppDomain was modified by an AppDomainManager configured with the NoSecurityChanges flag." from my WPF code... Any ideas?Frey
And from projects that have COM references.Frey

© 2022 - 2024 — McMap. All rights reserved.