When this error occurs ?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

When this error occurs ?

Post by puvinax » Fri 27 Sep 2013 08:22

{"The 'Instance' member of the Entity Framework provider type 'Devart.Data.SQLite.Entity.SQLiteEntityProviderServices, Devart.Data.SQLite.Entity, Version=4.6.333.0, Culture=neutral, PublicKeyToken=09af7300eec23701' did not return an object that inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. Entity Framework providers must inherit from this class and the 'Instance' member must return the singleton instance of the provider. This may be because the provider does not support Entity Framework 6 or later; see http://go.microsoft.com/fwlink/?LinkId=260882 for more information."}
Hi
I uninstalled previous version of Devart.Data.SQLite 4.6.287.0 then installed new version 4.6.333.0 so machin.config updated by installer.
I changed app.config Version Section to 4.6.333.0

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, 
Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.SQLite" type="Devart.Data.SQLite.Entity.SQLiteEntityProviderServices, Devart.Data.SQLite.Entity, Version=4.6.333.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
      </providers>
  </entityFramework>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
</configuration>
and added new dlls
but when run my sample above error occures
How resolve this problem ?

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

Re: When this error occurs ?

Post by Shalex » Fri 27 Sep 2013 09:04

Please change the version in your app.config: 4.6.333.0 -> 4.6.333.6.

puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

Re: When this error occurs ?

Post by puvinax » Fri 27 Sep 2013 09:31

that`s right, Thank you so much

tmc
Posts: 2
Joined: Tue 17 Jun 2014 14:14

Re: When this error occurs ?

Post by tmc » Tue 17 Jun 2014 14:24

I am getting the same thing. However Mine is {"The 'Instance' member of the Entity Framework provider type 'Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.181.0, Culture=neutral, PublicKeyToken=09af7300eec23701' did not return an object that inherits from 'System.Data.Entity.Core.Common.DbProviderServices'. Entity Framework providers must inherit from this class and the 'Instance' member must return the singleton instance of the provider. This may be because the provider does not support Entity Framework 6 or later; see http://go.microsoft.com/fwlink/?LinkId=260882 for more information."}

As I use Devart.Data.Oracle.

I have updated my web.config to 8.4.181.0 as it was previously 8.1.65.0 but this doesn't make any difference.

PS I searched web.config for all references to Devart.Data.Oracle and changed all 3 versions to the current version but no luck.

Any ideas?

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

Re: When this error occurs ?

Post by Shalex » Wed 18 Jun 2014 07:38

Here is an example of provider registration:

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" />
  </configSections>
  <entityFramework>
    <providers>
      <provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.181.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.Oracle" />
      <add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=8.4.181.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
</configuration>
Replace 8.4.181 here with your current version of dotConnect for Oracle. Please note that the revision number of provider in the entityFramework section is *.6 but in DbProviderFactories - *.0.

We recommend you to use Entity Developer (Devart Entity Model, *.edml) instead of EDM Designer (ADO.NET Entity Data Model, *.edmx) because it is adjusted for working with Oracle 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.

tmc
Posts: 2
Joined: Tue 17 Jun 2014 14:14

Re: When this error occurs ?

Post by tmc » Wed 18 Jun 2014 08:39

{As if you didn't know it would...}
That's fixed it. Thanks a million! :)
On to the next problem now - but that's not a Devart issue ;)

Post Reply