Provider 'Devart.Data.MySql' not registered

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
jpsignups
Posts: 2
Joined: Tue 29 Oct 2019 16:54

Provider 'Devart.Data.MySql' not registered

Post by jpsignups » Tue 29 Oct 2019 17:06

I can use DotConnect in Visual Studio and it retrieves data correctly. I have registered the provider buy adding this to my configuration file:

<provider invariantName="Devart.Data.MySql" type="Devart.Data.MySql.Entity.MySqlEntityProviderServices, Devart.Data.MySql.Entity.EF6, Version=8.10.1115.0, Culture=neutral, PublicKeyToken=09af7300eec23701"/>

All works well but when I go to deploy the application I receive the following error when trying to retrieve MySQL data:

System.ArgumentException: The ADO.NET provider with invariant name 'Devart.Data.MySql' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.

I have verified the exact same provider entry is present in the click-once deployment configuration.

jpsignups
Posts: 2
Joined: Tue 29 Oct 2019 16:54

Re: Provider 'Devart.Data.MySql' not registered

Post by jpsignups » Tue 29 Oct 2019 19:08

It turns out that in order to deploy an Entity Framework based application settings need to added to the configuration file like this:


<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.MySql" />
<add name="dotConnect for MySQL" invariant="Devart.Data.MySql" description="Devart dotConnect for MySQL" type="Devart.Data.MySql.MySqlProviderFactory, Devart.Data.MySql, Version=8.10.1115.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>

where the version number is replaced by the version of your dotconnect dlls.

Post Reply