TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
hro
Posts: 5
Joined: Fri 29 Mar 2013 16:35

TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Post by hro » Wed 12 Feb 2014 14:48

Hi,

I'm using dotConnect for MySQL version 7.8.322 with EntityFramework 5 (Devart.Data.MySql.Entity.dll for EF5) and FrameWork.Net 4.0 (System.Data.Entity.dll version=4.0.30319.1) and I get the following exception when executing Linq query :

System.TypeLoadException: Method 'SetDbParameterValue' on type 'Devart.Data.MySql.Entity.MySqlEntityProviderServices' from assembly 'Devart.Data.MySql.Entity, Version=7.8.322.0, Culture=neutral, PublicKeyToken=09af7300eec23701' is overriding a method that is not visible from that assembly.

I've got the same issue with dotConnect for Oracle version 7.9.322.

When I execute the same code with EntityFramework 5 (Devart.Data.MySql.Entity.dll for EF5) and FrameWork.Net 4.5 (System.Data.Entity.dll version=4.0.30319.18034) it works fine.

It works too with with EntityFramework 5 (Devart.Data.MySql.Entity.dll for EF4 ????) and FrameWork.Net 4.0 (System.Data.Entity.dll version=4.0.30319.1) ?????

Is the dotConnect for MySQL driver 7.8.322 compatible with with EntityFramework 5 and the Framework 4.0 ?

Thanks for your response.

CConnes
Posts: 8
Joined: Fri 10 Feb 2012 14:51

Re: TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Post by CConnes » Thu 13 Feb 2014 08:43

It seems the Dll in the folder C:\Program Files (x86)\devart\dotConnect\MySQL\Entity\EF5 is referencing System.Data.Entity instead of EntityFramework.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: TypeLoadException with with EntityFramework 5 and FrameWork.Net 4.0

Post by Shalex » Thu 13 Feb 2014 15:38

The EF5-specific functionality (enum support, spatial data types, etc) is available only in .NET Framework v4.5. If you are working with .NET Framework v4.0, please employ EntityFramework.dll v4.4 (not 5.0) and \Program Files (x86)\Devart\dotConnect\MySQL\Entity\EF4\Devart.Data.MySql.Entity.dll.

Post Reply