English 中文(简体)
.net 4.0 with Code Access Security NetFx40_LegacySecurityPolicy won t work
原标题:

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:WindowsMicrosoft.NETFrameworkv4.0.21006msbuild.exe.config 3) C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEdev.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?

最佳回答

LC.exe fails to process license information of devexpress 9.1.4 dlls Update: Looks like this program is related to lc.exe. create a file called lc.exe.config that contains

<NetFx40_LegacySecurityPolicy enabled="true"/>

under C:Program FilesMicrosoft SDKsWindowsv7.0Ain (NETFX 4.0 Tools) solves the problem

问题回答

This does work, however, you ll also need to create a file for devenv.exe.config to edit form designer changes, and the side effect of that is that COM references in project s will give obscure errors.

The end result, is that we really need an update from DevExpress on this. Allegedly a beta fix with a 2010.1 release is due any time now, come on DevExpress, hurry up! :)





相关问题
Is there a better tool than permcalc to analyse permissions?

I have some code which needs to run under medium trust but doesn t. I ve used permcalc in the past but it is rather painful to get the output and compare it to the medium trust definition. What I ...

When to use SharePointPermissionAttribute

When do I actually need to decorate my methods with the SharePointPermission attribute? I ve come across some code samples that have them and some that don t.

热门标签