TypeLoadException - MySqlEFConfiguration
Posted by: Dave Tillman
Date: November 03, 2016 10:37AM

With version 7.0.6-IR3 of MySql.Data.Entity I see this exception:

System.TypeLoadException : Inheritance security rules violated by type: 'MySql.Data.Entity.MySqlEFConfiguration'. Derived types must either match the security accessibility of the base type or be less accessible.

It appears it might be due to the fact that this was changed in AssemblyInfo.cs ( https://github.com/mysql/mysql-connector-net/blob/7.0/Source/MySql.Data.Entity.EF6/Properties/AssemblyInfo.cs )

[assembly: AllowPartiallyTrustedCallers]

At some point the "#if EF6" was removed ... this was in ( https://github.com/mysql/mysql-connector-net/blob/7.0.3-IR1/Source/MySql.Data.EntityFramework6/Properties/AssemblyInfo.cs )

#if EF6
[assembly: AssemblyTitle("MySql.Data.Entity for EF6")]
[assembly: AssemblyDescription("Entity Framework 6.0 supported")]
[assembly: AssemblyTitle("MySql.Data.Entity")]
[assembly: AssemblyDescription("")]
[assembly: AllowPartiallyTrustedCallers()]

Options: ReplyQuote

Written By
TypeLoadException - MySqlEFConfiguration
November 03, 2016 10:37AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.