in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

.net 4.0 support?

Last post 11-24-2010 10:50 AM by BicaTM. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 04-18-2010 9:01 AM

    .net 4.0 support?

    I wanted to convert a couple of my projects using the provider to 4.0 to use some new features, but when I did so, the ctor of my ObjectContext subclass started failing with: System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. I'm assuming (at the moment) that this is because the provider doesn't register as an "ADO.NET 4" provider? (just a guess). 1) if a specific 4.0 version is required, is it on the schedule and is there an ETA? 2) if a specific 4.0 version is NOT required, what are the steps to get the existing provider working for 4.0 projects? Thanks!!
    Filed under: ,
  • 04-18-2010 11:01 AM In reply to

    Re: .net 4.0 support?

    You have to add a section to your .config file to be able to load the 2.0 assembly in 4.0.  I won't have a 4.0-built assembly out for a bit yet.

    <?xml version="1.0" encoding="utf-8" ?>
    <
    configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
      <
    supportedRuntime version="v4.0" />
    </
    startup>
    </
    configuration>

  • 04-20-2010 4:31 PM In reply to

    • OzFab
    • Not Ranked
    • Joined on 04-20-2010
    • Posts 1

    Re: .net 4.0 support?

    Talking about .net 4.0, do you have any plan to support the new features provided with Entity Framework 4? I'm especially thinking about their "Model First" approach which would be very useful for unit testing as we could then use an in-memory SQLite database to mock the real SQL Server database without having to clean up the data after every run.

    I'm currently working on the SQL script generation from the model for SQLite and it doesn't seem to be too hard.

    Thanks

  • 04-28-2010 3:27 AM In reply to

    Re: .net 4.0 support?

    Hi,
    I'm trying to change my application from .Net3.5 to .Net4, and I run into problems with System.Data.SQLite.dll.
    Feels like I've tried everything now - including the App.config edit you give here, but it doesn't fix the problem.

    I am using SQLite through FluentNHibernate and NHibernate, and I get the following exception thrown in my face when
    setting up the connection using a SQLite DB:

    "Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4."

    The InnerException suggests that there is some problem with IDbConnection and IDbCommand:

    "The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use element in the application configuration file to specify the full name of the assembly."

    Do you have any idea what I can do to get around this problem?

    (More info on StackOverflow: http://stackoverflow.com/questions/2697795/problems-using-fluentnhibernate-sqlite-with-net4)


  • 04-28-2010 5:34 AM In reply to

    Re: .net 4.0 support?

    Actually - nevermind. It seems to be working after all. Looks like a little x64 x86 mismatch managed to sneak in..

    But +1 for a System.Data.SQLite.dll with .Net4 support! 

  • 05-23-2010 4:16 AM In reply to

    Re: .net 4.0 support?

     Hi Robert,

    When do you plan to release a .NET 4 version of System.Data.SQLite? One month, two... ?

    Do you have a roadmap?

    Thank you very muh.

     

    Cyber Sinh

  • 06-04-2010 8:58 AM In reply to

    • radioman
    • Top 500 Contributor
    • Joined on 10-13-2008
    • Lithuania, Vilnius
    • Posts 7

    Re: .net 4.0 support?

    why wait, make it so! ;}
    d{^__^}b - it's time to fly
  • 06-24-2010 9:57 PM In reply to

    • kg6ypi
    • Not Ranked
    • Joined on 06-25-2010
    • Posts 2

    Re: .net 4.0 support?

    Robert Simpson:
    <?xml version="1.0" encoding="utf-8" ?>

    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
      <
    supportedRuntime version="v4.0" />
    </
    startup>
    </
    configuration>

     

     Thanks you very much, now I can use VS 2010 Express :)

  • 08-31-2010 10:58 AM In reply to

    Re: .net 4.0 support?

    Hi there, iam running Express 2010, but it seems that i just cant find the .config file where u should ad this " " how and what file is it that i have to change ?
  • 08-31-2010 5:48 PM In reply to

    • kg6ypi
    • Not Ranked
    • Joined on 06-25-2010
    • Posts 2

    Re: .net 4.0 support?

    Its your "app.config" file in your project's root folder, if its not there; just create a text file and save it as "app.config" then make sure to add it to your project...
  • 09-01-2010 1:34 PM In reply to

    Re: .net 4.0 support?

    How do you add that to your project ? i am new to this, i know how to do simple programming but this is a little advance :) Cant somone make a smaple project file and put into a rar file and upload ? that works with 2010 ? that had been great :)
  • 09-01-2010 3:51 PM In reply to

    Re: .net 4.0 support?

    • Right click the project in the solution explorer
    • Add, New Item ...
    • Select "Application Configuration File" in the window that comes up
    • Paste the sample into the file this creates
  • 11-24-2010 10:50 AM In reply to

    • BicaTM
    • Not Ranked
    • Joined on 11-24-2010
    • Posts 1

    Re: .net 4.0 support?

    Hi Robert,

    Is it possible to get an 4.0 x86 build? Because I have following problem in my scenario:

    => interop c# 4.0 assembly uses your sqlite 2.0 assembly

    => my vb script gets an instance of the interop c# 4.0 class

    => at this point I get the error. I can't create an instance, because the CLR doesn't run in the mixed mode.

    => I can't add a config file to set the useLegacyV2RuntimeActivationPolicy flag, because there is no exe! Actually there is one, but you won't set such a config file for cscript.exe or wscript.exe in the windows system32 folder!

     

    Or is there any other way to solve my problem?

    Thanks,

     

    Thomas Mathis

    Bica AG, Switzerland

     

Page 1 of 1 (13 items)
Powered by Community Server (Commercial Edition), by Telligent Systems