Create 3 different db from 1 model

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
INDI03
Posts: 5
Joined: Mon 23 Feb 2015 14:57

Create 3 different db from 1 model

Post by INDI03 » Thu 26 Feb 2015 09:16

Hello!

Since you don't answere my questions in the other thread I tried some stuff on my own.
But I got stuck again.
I created a model with the built-in designer from visual studio
When I click "create database from model" I get this error:
"No Entity Framework provider found for the ADO.NET provider with invariant name 'Devart.Data.PostGreSql'. Make sure the provider is registered in the 'entityFramework' section of the application config file.

here my app config file:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <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, Version=7.3.352.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      <provider invariantName="Devart.Data.SQLite" type="Devart.Data.SQLite.Entity.SQLiteEntityProviderServices, Devart.Data.SQLite.Entity, Version=5.2.352.6, 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.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.3.352.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      <remove invariant="Devart.Data.SQLite" />
      <add name="dotConnect for SQLite" invariant="Devart.Data.SQLite" description="Devart dotConnect for SQLite" type="Devart.Data.SQLite.SQLiteProviderFactory, Devart.Data.SQLite, Version=5.2.352.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
</configuration>

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Create 3 different db from 1 model

Post by MariiaI » Thu 26 Feb 2015 13:13

Please change the version of provider from 7.3.352.6 to 7.3.352.0 (PostgreSQL), from 5.2.352.6 to 5.2.352.0 (SQLite) in the DbProviderFactories section, i.e.:

Code: Select all

<DbProviderFactories>
      <remove invariant="Devart.Data.PostgreSql" />
      <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.3.352.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      <remove invariant="Devart.Data.SQLite" />
      <add name="dotConnect for SQLite" invariant="Devart.Data.SQLite" description="Devart dotConnect for SQLite" type="Devart.Data.SQLite.SQLiteProviderFactory, Devart.Data.SQLite, Version=5.2.352.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
For more information, refer to http://blog.devart.com/entity-framework ... gistration.

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

Re: Create 3 different db from 1 model

Post by Shalex » Thu 26 Feb 2015 13:30

The revision number of Devart ADO.NET providers in the entityFramework section is *.6 but it should be *.0 in DbProviderFactories. For more information, refer to http://blog.devart.com/entity-framework ... force.html.

Does this information help?

INDI03
Posts: 5
Joined: Mon 23 Feb 2015 14:57

Re: Create 3 different db from 1 model

Post by INDI03 » Thu 26 Feb 2015 15:38

Thx for answere - no it doesent - same error

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Create 3 different db from 1 model

Post by MariiaI » Fri 27 Feb 2015 11:36

Have you rebuilt your solution after updating the config file and before adding new model?
If yes and it is not the reason of the issue, please send us your test project, so that we could investigate the issue more clearly.

Post Reply