EntityDeveloper not working

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
sanvenk
Posts: 2
Joined: Mon 25 Oct 2021 08:40

EntityDeveloper not working

Post by sanvenk » Mon 25 Oct 2021 08:45

the following error occurs when the model is opened and when I try to compile

The provider did not return a ProviderManifest instance. Attempt by security transparent method 'Devart.Data.MySql.MySqlUtils.h(System.String)' to access security critical method 'Devart.Common.Utils.TryParseInt(System.String, Int32 ByRef)' failed.

Assembly 'Devart.Data.MySql.Entity.EF5, Version=8.19.2001.0, Culture=neutral, PublicKeyToken=09af7300eec23701' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.

please help to resolve this issue.

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

Re: EntityDeveloper not working

Post by Shalex » Tue 26 Oct 2021 15:35

Thank you for your report. We have reproduced the issue and are investigating it. As soon as we have any results, we will contact you.

sanvenk
Posts: 2
Joined: Mon 25 Oct 2021 08:40

Re: EntityDeveloper not working

Post by sanvenk » Fri 05 Nov 2021 11:04

Any updates/progress on this issue? I am still facing this issue with build 8.19.2001. I am using windows 11

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

Re: EntityDeveloper not working

Post by Shalex » Tue 09 Nov 2021 16:58

The investigation is in progress. We will notify you about the fix.

msisco
Posts: 2
Joined: Mon 13 Dec 2021 15:49

Re: EntityDeveloper not working

Post by msisco » Mon 13 Dec 2021 15:50

I am also having this same problem. Has there been any update on this?

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

Re: EntityDeveloper not working

Post by Shalex » Mon 13 Dec 2021 17:50

As a workaround, please remove assemblies compiled for .NET Framework 4.7 to make runtime to use assemblies compiled for .NET Framework 2.0.

So, you need to delete the folders:

​* C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data\
* C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.MySql\

and these assemblies:

* "C:\Program Files (x86)\Common Files\Devart\dotConnect\NET4\Devart.Data.dll"
* "C:\Program Files (x86)\Common Files\Devart\dotConnect\NET4\Devart.Data.MySql.dll"
* "C:\Program Files (x86)\Devart\dotConnect\MySQL\NET4\Devart.Data.dll"
* "C:\Program Files (x86)\Devart\dotConnect\MySQL\NET4\Devart.Data.MySql.dll"

Then, please clear the bin and obj folders of your project and rebuild the project.

We will post a notification here about the fix after it is implemented.

msisco
Posts: 2
Joined: Mon 13 Dec 2021 15:49

Re: EntityDeveloper not working

Post by msisco » Mon 13 Dec 2021 19:42

This got rid of the error regarding the ProviderManifest, but didn't solve the over-arching problem which I assumed was related.

If I try to "Update Model from Database" and select a connection, I am given the following error:

"Your project references the latest version of Entity Framework; however, an Entity Framework provider compatible with this version could not be found for your data connection."

I get the same error if I try to create a new model using dotConnect for MySQL.

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

Re: EntityDeveloper not working

Post by Shalex » Wed 15 Dec 2021 17:28

msisco wrote: Mon 13 Dec 2021 19:42 This got rid of the error regarding the ProviderManifest, but didn't solve the over-arching problem which I assumed was related.

If I try to "Update Model from Database" and select a connection, I am given the following error:

"Your project references the latest version of Entity Framework; however, an Entity Framework provider compatible with this version could not be found for your data connection."

I get the same error if I try to create a new model using dotConnect for MySQL.
Please upgrade to dotConnect for MySQL v8.19.2014. This build works successfully with EDM Wizard in your test project.

FYI: we recommend using Entity Developer (the Devart Entity Model item, *.edml) instead of EDM Designer (the ADO.NET Entity Data Model item, *.edmx) because it is adjusted for working with MySQL and has an advanced functionality: http://www.devart.com/entitydeveloper/ed-vs-edm.html. Additionally, Entity Developer adds registration of EF6 provider in app.config automatically.

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

Re: EntityDeveloper not working

Post by Shalex » Wed 26 Jan 2022 18:01

The new build dotConnect for MySQL v8.21.2066 includes the following improvements:
  • The new \Entity\EF5\net47\Devart.Data.MySql.Entity.EF5.dll assembly compiled with .NET Framework 4.7 is added
  • The behavior is changed: Devart.Data.MySql.Entity.EF5.dll compiled with .NET Framework 4.7 is used now in EF5 models
With v8.21.2066, you can use the following references in your project:
* C:\Program Files (x86)\Devart\dotConnect\MySQL\NET4\Devart.Data.dll
* C:\Program Files (x86)\Devart\dotConnect\MySQL\NET4\Devart.Data.MySql.dll
* C:\Program Files (x86)\Devart\dotConnect\MySQL\Entity\EF5\net47\Devart.Data.MySql.Entity.EF5.dll

Post Reply