Bug #88357 Exception after update connector .NET
Submitted: 4 Nov 2017 1:13 Modified: 14 Nov 2017 14:43
Reporter: Carlos Ayala Email Updates:
Status: Can't repeat Impact on me:
Category:Connector / NET Severity:S1 (Critical)
Version:6.10.4 OS:Any
Assigned to: CPU Architecture:Any

[4 Nov 2017 1:13] Carlos Ayala
I'm working on a Windows forms application on which i was using MySQL connector .NET 6.9.10 and Entity Framework 6.2.0 and it was working fine. After updating connector to 6.10.4 it throws an exception inmediately when the first query is executed:

System.InvalidOperationException: 'The DbConfiguration type 'MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6' specified in the application config file could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information.'

Internal exception
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.

Going back to 6.9.10 everything is OK again.


How to repeat:
Install connector 6.10.4
[6 Nov 2017 6:33] Chiranjeevi Battula
Hello Carlos,

Thank you for the bug report.
I could not repeat the issue at our end using with Visual Studio 2015, Connector/NET 6.10.4 version.
Could you please provide repeatable test case (exact steps/sample project, connection string,create tables statements etc. - please make it as private if you prefer) to confirm this issue at our end?

[9 Nov 2017 15:07] Carlos Ayala
I'll prepare and post an example.
[9 Nov 2017 19:54] Spartak Timchev
I can confirm this bug is present. Both in VS2015 and VS2017. It just throws exception:

"Inheritance security rules violated while overriding member: 'MySql.Data.Entity.MySqlConnectionFactory.CreateConnection(System.String)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.":"MySql.Data.Entity.MySqlConnectionFactory.CreateConnection(System.String)"

It was ok in 6.9.9 and 6.9.10. This happened after updating the packages with nuget. Nothing else is done on the project.

The project is DB independant and works on SQL Server, MySQL and PostreSQL, and coresponding nuget packages are installed for PostgreSQL. Maybe this has something to do with the bug.
[9 Nov 2017 23:54] Carlos Ayala
I don't think that the problem is caused because the PostgreSQL package, because i didn't install it on example Project.
[14 Nov 2017 12:04] Chiranjeevi Battula
Hello Carlos,

Thank you for the feedback and test case.
I could not repeat the issue at our end using with Visual Studio 2015, MySQL 5.7.20 and Connector/NET 6.10.4 version.

[14 Nov 2017 14:43] Carlos Ayala
Spartak Timchev and me are facing the same issue, is there anybody that could test and repeat it? Any pointer about what we can do?