日期:2014-05-20  浏览次数:21650 次

SQLite部署:找不到或无法加载已注册的 .Net Framework 数据提供程序
我是用的VS08+SQLite(SqLiteFarmerWork)开发的winform程序。结果部署报这个错;
安装了“SQLite-1.0.66.0-setup.exe”;并且配置文件与machine.Config都确保有以下配置:
<system.data>
<DbProviderFactories>
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.66.0, Culture=neutral,PublicKeyToken=db937bc2d44ff139" />
</DbProviderFactories>
</system.data>
可是还是报错,不晓得大家有么有遇到过这个问题?

----------------------------
System.Configuration.ConfigurationErrorsException: 找不到或无法加载已注册的 .Net Framework 数据提供程序。
  在 System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
  在 System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
  在 System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
  在 System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
  在 System.Data.EntityClient.EntityConnection..ctor(String connectionString)
  在 System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
  在 System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
  在 Models.ArbitragePlusEntities..ctor() 位置 F:\ArbitragePlus\ArbitragePlus\Models\ArbitragePlusEntities.Designer.cs:行号 26
  在 BLL.BLL.UserManager..ctor() 位置 F:\ArbitragePlus\ArbitragePlus\BLL\BLL\UserManager.cs:行号 12
  在 UI.Login.button1_Click(Object sender, EventArgs e) 位置 F:\ArbitragePlus\ArbitragePlus\UI\Login.cs:行号 26
  在 System.Windows.Forms.Control.OnClick(EventArgs e)
  在 System.Windows.Forms.Button.OnClick(EventArgs e)
  在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
  在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  在 System.Windows.Forms.Control.WndProc(Message& m)
  在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
  在 System.Windows.Forms.Button.WndProc(Message& m)
  在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--------------------------------------------------------------------
----------------------------------------
*我发现凡事用vs资源管理器建立一个SQLite的链接的机器再部署就没问题了,但是客户那边不可能让他装vs吧,唉烦闷苦恼ing!跪求高手解答!谢之~~


------解决方案--------------------
更改系统的web.config(不是当前站点的web.config)里的LocalSqlServer,把它指向Sql Server 


------解决方案--------------------
本地有SqLite的环境吗?
要么是环境 要么是配置的原因