none
Problem deploying app with sqlite

    คำถาม

  • Hi,

    I've developed a small winform app that uses sqlite with entity framework.

    for it to work I've installed sqlite ado.net provider from here . everything works on my dev machine with VS2008.

    When I deploy it to a clean windows 7 with .net 3.5.1 and the provider I get the following error:

    ---------------------------

    ---------------------------
    System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.

       at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)

       at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

       --- End of inner exception stack trace ---

       at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

       at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)

       at System.Data.EntityClient.EntityConnection..ctor(String connectionString)

       at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)

       at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)

       at Lib.StoreEntities..ctor() in C:\Documents and Settings\aharush.VOGATECH\My Documents\Visual Studio 2008\Projects\StoreManager\Lib\Store.Designer.cs:line 26

       at Lib.ContextManager..ctor() in C:\Documents and Settings\aharush.VOGATECH\My Documents\Visual Studio 2008\Projects\StoreManager\Lib\ContextManager.cs:line 14

       at StoreManager.frmMain..ctor() in C:\Documents and Settings\aharush.VOGATECH\My Documents\Visual Studio 2008\Projects\StoreManager\StoreManager\frmMain.cs:line 29

       at StoreManager.Program.Main() in C:\Documents and Settings\aharush.VOGATECH\My Documents\Visual Studio 2008\Projects\StoreManager\StoreManager\Program.cs:line 20\

     

    my app config is:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <connectionStrings>
        <add name="StoreEntities" connectionString="metadata=res://*/Store.csdl|res://*/Store.ssdl|res://*/Store.msl;provider=System.Data.SQLite;provider connection string='data source=&quot;C:\Users\user1\Documents\Store.s3db&quot;'" providerName="System.Data.EntityClient" />
      </connectionStrings>
     
    </configuration>

     

    Thanks

    Avi

    9 ตุลาคม 2553 9:24

คำตอบ

ตอบทั้งหมด