Page 1 of 1

EntityDeveloper not working

Posted: Mon 25 Oct 2021 08:45
by sanvenk
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.

Re: EntityDeveloper not working

Posted: Tue 26 Oct 2021 15:35
by Shalex
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.

Re: EntityDeveloper not working

Posted: Fri 05 Nov 2021 11:04
by sanvenk
Any updates/progress on this issue? I am still facing this issue with build 8.19.2001. I am using windows 11

Re: EntityDeveloper not working

Posted: Tue 09 Nov 2021 16:58
by Shalex
The investigation is in progress. We will notify you about the fix.

Re: EntityDeveloper not working

Posted: Mon 13 Dec 2021 15:50
by msisco
I am also having this same problem. Has there been any update on this?

Re: EntityDeveloper not working

Posted: Mon 13 Dec 2021 17:50
by Shalex
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.

Re: EntityDeveloper not working

Posted: Mon 13 Dec 2021 19:42
by msisco
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.

Re: EntityDeveloper not working

Posted: Wed 15 Dec 2021 17:28
by Shalex
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.

Re: EntityDeveloper not working

Posted: Wed 26 Jan 2022 18:01
by Shalex
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