Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic V6.0.4: System.TypeLoadException (Read 2864 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
V6.0.4: System.TypeLoadException
Aug 22nd, 2013 at 10:00pm
Print Post  
We just upgraded from v6.0.0 to v6.0.4, and I am getting the following exception:

System.TypeLoadException: Inheritance security rules violated while overriding member: 'MindFusion.Drawing.Pen.GetObjectData(System.Runtime.Serialization.Serialization
Info, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: V6.0.4: System.TypeLoadException
Reply #1 - Aug 23rd, 2013 at 8:35am
Print Post  
Add this to the assembly where you are overriding GetObjectData (in AssemblyInfo.cs):

[assembly: SecurityRules(SecurityRuleSet.Level1)]

or mark only the overridden method with a SecurityCriticalAttribute.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
Re: V6.0.4: System.TypeLoadException
Reply #2 - Aug 23rd, 2013 at 4:03pm
Print Post  
We weren't overriding that method anywhere as far as I could tell, I had to add those attributes to the MindFusion source in order to make it work.. Seems to work fine now though.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: V6.0.4: System.TypeLoadException
Reply #3 - Aug 23rd, 2013 at 4:44pm
Print Post  
I can see the assembly attribute in our code, but it's inside an #if DOTNET4 condition. If you are adding the source files to your own project, define DOTNET4 in Project Properties -> Build -> Conditional Symbols, to include that and some other conditional code specific for .NET 4 in compilation.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint