Unable to find the requested .Net Framework Data Provider - SQLite

前端 未结 1 1464
醉梦人生
醉梦人生 2020-12-03 03:08

I thought that sqlite was simple but it is giving me a hard time. I just want to create an application where I can connect to a sqlite database using the ado.net entity data

相关标签:
1条回答
  • 2020-12-03 03:41

    had to add:

     <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" />
         </DbProviderFactories>
      </system.data>
    

    to my app config file. and it now looks like:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0,Profile=Client" />
      </startup>
      <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" />
          </DbProviderFactories>
        </system.data>
    </configuration>
    

    In the location where sqlite was installed I had to copy

    enter image description here

    to my output directory where my program exe is located

    0 讨论(0)
提交回复
热议问题