CodeSimth

使用CodeSimth 连接SQLite数据库库 提示错误

codesmith 6以上的版本,说是支持sqlite生成,也有对应的sqliteprovider.dll,但是使用时却说Test failed.  找不到请求的 .Net Framework Data Provider。可能没有安装。

拷贝下面dll 到 CodeSimth 的 Bin目录下

x64/SQLite.Interop.dll   x86/SQLite.Interop.dll  

System.Data.SQLite.dll,System.Data.SQLite.Linq.dll

修改 CodeSmith.exe.config 和 TemplateEditor.exe.config config文件

添加

<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>

 

关闭 CodeSimth  重新启动 即可

原文地址:https://www.cnblogs.com/z_lb/p/5485945.html