VS2010 Ef+Sqlite.net部署时出现“The specified data store provider cannot be found, or is not valid”的解决办法

最近做了一个小软件,使用VS2010开发,用了EF和Sqlite.Net。

在客户机器上安装,运行时出现了错误:“The specified data store provider cannot be found, or is not valid”。查阅资料找到解决方案:

1、必须包含System.Data.SQLite.dll、System.Data.SQLite.Linq.dll两个dll;

2、在程序的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>



posted @ 2011-11-16 09:33  伸手不见五趾  阅读(1304)  评论(0编辑  收藏  举报