System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
Ticket Hash: 7b8fd3ef77075c9c9dfac214cb77a48eae316f6e
Title: I use the test and work the EF5 but not EF6
Status: Closed Type: Incident
Severity: Important Priority: Medium
Subsystem: NuGetPackage Resolution: Unable_To_Reproduce
Last Modified: 2014-03-08 03:35:22
Version Found In: 1.0.91.0
User Comments:
anonymous added on 2014-02-16 18:40:51: (text/x-fossil-plain)
I have downloaded the zip "sqlite-netFx40-binary-bundle-x64-2010-1.0.91.0" and I can run the test of the EF5 version of SQLite, but when I try to run the test6f.exe the application crush without any message.

I have installed the sqlite-netFx451-setup-bundle-x86-2013-1.0.91.0.exe to install the design components in VS2013.



Thanks.

anonymous added on 2014-02-16 19:52:48: (text/x-fossil-plain)
I am trying more cases.

I delte all my references for my EntityFramewok.dll 5.0 and references of my SQLite dlls of version 1.0.90.0 and uninstall the nughets packages.

I delete all the content of my appconfig.

WIth the nugget manager, I install SQLite 1.0.91.0 and install the EF 6.0.2 version and modfiy my appconfig with the provider.

It's seems that all is correct, but when I try to create the edmx, in the wizzard I get the message that I have the most recent version of EF6, I have only have this option, but it is in grey (disabled) because I don't have a privder compatible with this version of EF.

However, I I go to my references, I have the SQLite dlls with the version 1.0.91.0.

What else I need to install correcly SQlite? I have the last version of dlls and also I have the appconfig with the providers.

I have tried to use the configuration of the appconfig of the test application in the bundle zip of the version 1.0.91.0 but I have the same problem.

How can I update my project to use EF6 and SQlite?



Thanks.

anonymous added on 2014-02-17 08:05:31: (text/x-fossil-plain)
If you ned more information, you can ask me all you need.



Thanks for your time and work.

anonymous added on 2014-02-17 09:56:09: (text/x-fossil-plain)
If I use this configuration file:

<?xml version="1.0"?>
<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>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0"/>
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6, Version=1.0.91.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite" />
      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.91.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
    </DbProviderFactories>
  </system.data>
</configuration>


I don't get the error, but I get a new one, that says that I don't have register the System.Data.SQlite.EF6 in the computer or in the config file.

mistachkin added on 2014-02-17 22:35:09: (text/x-fossil-plain)
To use EF6 with the design-time components in Visual Studio, you might need to
add the EntityFramework.dll and System.Data.SQLite.EF6.dll assemblies to the
global assembly cache (GAC).

Please note that this configuration is not officially supported.

anonymous added on 2014-02-18 04:44:43: (text/x-fossil-plain)
I ran into exactly the same problem as described by "anonymous added on 2014-02-16 19:52:48:". 

Here is the provider config added by NuGet. I think the invariantName should be without ".EF6" to machine the connection string.

<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />


I then checked System.Data.SQLite.EF6 assembly, I don't find SQLiteProviderServices there which is supposed to implement System.Data.Entity.Core.Common.DbProviderServices. Am I doing the wrong way or something is missing in System.Data.SQLite.EF6 assembly?

mistachkin added on 2014-02-18 05:50:47: (text/x-fossil-plain)
I just checked the System.Data.SQLite.EF6 assembly here and found the type.

It is defined here:

[/artifact?ci=trunk&filename=System.Data.SQLite.Linq/SQLiteProviderServices.cs]

With a test here:

[/artifact?ci=trunk&filename=Tests/basic.eagle&ln=1587-1605]

anonymous added on 2014-02-18 06:17:23: (text/x-fossil-plain)
I'm new to SQLite, don't quite understand the source code. Using Object Brower in VS2013 , I opened both System.Data.SQLite.EF6 and System.Data.SQLite.Linq(both from NuGet Package), still don't see System.Data.SQLite.EF6.SQLiteProviderServices.

mistachkin added on 2014-02-18 06:59:04: (text/x-fossil-plain)
Due to limitations of Visual Studio, the source files for those projects will not
be visible within the IDE (i.e. because the projects use conditionals to control
various features).  However, the types will be visible in the compiled assemblies
using the ILDASM tool.

mistachkin added on 2014-02-18 07:03:05: (text/x-fossil-plain)
For this ticket, I think part of the problem is that the System.Data.SQLite setup
packages do not modify the system-wide configuration for use with EF6; however,
this cannot be helped because the Entity Framework 6 deployment guidelines forbid
setup packages from registering it in the GAC (global assembly cache) and without
putting it there, it cannot be used from the machine configuration file.

mistachkin added on 2014-02-18 07:06:22: (text/x-fossil-plain)
Furthermore, it is possible to perform the necessary configuration steps manually;
however, it would involve manually placing the Entity Framework 6 assembly into
the GAC, followed by manually invoking the design-time components installer for
System.Data.SQLite (installer.exe) with just the right set of command line
arguments (i.e. to modify the machine-wide configuration file and place the System.Data.SQLite.EF6 assembly into the GAC).

anonymous added on 2014-02-18 07:29:28: (text/x-fossil-plain)
Thanks for all the help. I guess I got into this trouble because I am tying to use database first and let VS to generate the model. Is there still a way to make this approach work(or in the future)?

mistachkin added on 2014-02-19 03:39:35: (text/x-fossil-plain)
All NuGet packages have been updated to 1.0.91.3.  Several fixes are included
that pertain to supporting Entity Framework 6.

anonymous added on 2014-02-19 16:31:19: (text/x-fossil-plain)
I have still the same problem.

I Unistall the 1.0.91 version from nuget manager. This unistall the EF 6.0.2 and SQLite 1.0.91. Also I delete all my app config file.

I install SQLite from nuget manager, this install SQLite 1.0.91.3 and EF 6.0.2. Aslo update de app config file.

I try to create a new edmx and I have the same problem, it says that I am using the last version of EF but I don't have a database provider that support this version of EF.

Also I try to use the configuration that I post here in few messages above, but the problem persists.

I theory with the steps that I follow it should work?



Thanks.

mistachkin added on 2014-02-19 19:03:44: (text/x-fossil-plain)
Can you try making your configuration file look more like this one:

[/artifact?ci=trunk&filename=testlinq/2013/EF6/App.config]