.net 4.0 with Code Access Security NetFx40_LegacySecurityPolicy won't work

Posted by user210903 on Stack Overflow See other posts from Stack Overflow or by user210903
Published on 2009-11-14T04:22:46Z Indexed on 2010/03/26 22:43 UTC
Read the original article Hit count: 575

Hi-

I'm trying to use an external library DevExpress.XtraTreeList.v8.1.dll in my vsto office addin built using VS2010 beta 2. I am getting the following compile time error:

DevExpress.Utils.AppareanceObject threw an exception --> System.NotSupportedException.

The error message goes on to say that for compatibility reasons I can use the NetFx40_LegacySecurityPolicy switch.

I've tried putting this config variable in all of the following locations:

1) my applications config file.
2) C:\Windows\Microsoft.NET\Framework\v4.0.21006\msbuild.exe.config 3) C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\dev.exe.config

None of these have resolved the problem. Here were the references I've used.

re-enable cas

msdn.microsoft.com/en-us/library/ee191568(VS.100).aspx

How do I get rid of this error so I can build the application in vs 2010?

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about code-access-security