The relevant section of the error log:
Code: Select all
System.TypeInitializationException: The type initializer for 'DevExpress.Utils.AppearanceObject' threw an exception. ---> System.NotSupportedException: This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
at System.Security.SecurityManager.ResolvePolicy(Evidence evidence)
at DevExpress.Data.Helpers.SecurityHelper.IsPermissionGranted(IPermission permission)
at DevExpress.Utils.Design.DXAssemblyResolverEx.Init()
at DevExpress.Utils.AppearanceObject..cctor()
--- End of inner exception stack trace ---
at DevExpress.Utils.AppearanceObject..ctor()
at DevExpress.Utils.ToolTipControllerShowEventArgs..ctor(Control control, Object obj, Object dummy)
at DevExpress.Utils.ToolTipController..ctor()
at DevExpress.Utils.ToolTipControllerDefault..ctor()
at DevExpress.Utils.ToolTipController.get_DefaultController()
at DevExpress.XtraEditors.BaseControl..ctor()
at DevExpress.XtraEditors.BaseEdit..ctor()
at DevExpress.XtraEditors.TextEdit..ctor()
at BudgetMainWindow.BUTransfer.InitializeComponent()
at BudgetMainWindow.BUTransfer..ctor(BUBankAccount& DebitAccount, BUBankAccount& CreditAccount)
at BudgetMainWindow.BUEnvelopeMatrix.ThisAccount_DragDrop(Object sender, DragEventArgs e)
https://docs.microsoft.com/en-us/previo ... dfrom=MSDN
Gives two options
You can avoid the warnings and errors by either:
Migrating to the .NET Framework 4 replacements for the obsolete calls.
- or -
Using the <NetFx40_LegacySecurityPolicy> configuration element to opt into the legacy CAS policy behavior.
So I guess my first question is which is the better of the two options above? I've cd'd around trying to locate the config file, but haven't been found an .XML. However, I'm not sure I'm looking in correct directory to add the opt in policy behavior.
Thanks,