Page 1 of 1

Failed to find or load the registered .Net Framework Data Provider

Posted: Thu 17 Nov 2016 09:18
by oana
Hi,

I got his error: "Failed to find or load the registered .Net Framework Data Provider" when I run my application.
I have downloaded the last dotConnect for Postgresql, I added references to Devart.Data, Devart.Data.Postgresql, Devart.Data.Postgresql.Entity, the licence is ok, I built the edmx successfully, but when I run the application, I get the error described up.

My app.config file:

Code: Select all

  <entityFramework>
    <!--<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />-->
    <providers>
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity.EF6, Version=7.6.763.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.PostgreSql" />
      <add name="dotConnect for Postgresql" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for Postgresql" type="Devart.Data.PostgreSql.PostgreSqlProviderFactory, Devart.Data.PostgreSql, Version=7.6.763.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
Can you please help?

Re: Failed to find or load the registered .Net Framework Data Provider

Posted: Fri 18 Nov 2016 08:58
by oana
I managed to get it work excluding this block from App.config:

Code: Select all

<system.data>
        <DbProviderFactories>
            <remove invariant="Devart.Data.PostgreSql" />
            <add name="dotConnect for Postgresql" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for Postgresql" type="Devart.Data.PostgreSql.PostgreSqlProviderFactory, Devart.Data.PostgreSql, Version=7.6.763.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
        </DbProviderFactories>
    </system.data>
Hope this helps others also!

I actually do not know why is it working without this block, cause I saw in the help documentation and in other posts that this block should be there (or not?).

Re: Failed to find or load the registered .Net Framework Data Provider

Posted: Fri 18 Nov 2016 16:28
by Shalex
oana wrote:I got his error: "Failed to find or load the registered .Net Framework Data Provider" when I run my application.
1. Please specify the full stack trace of the error.
2. Send us a small test project for reproducing the issue.
oana wrote:I managed to get it work excluding this block from App.config: [...]
Your application is working on a development workstation because the DbProviderFactories entry is available in machine.config (created by dotConnect for PostgreSQL installation). But it should work with the same DbProviderFactories entry in App.config as well.