2012-05-29 67 views
1

我试图部署使用.SDF文件和实体框架的应用程序。每当部署的应用程序试图使用实体(连接到数据库),我得到的错误:使用SQL Server CE数据库部署项目

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)

我的连接字符串如下所示:

我读的地方,我可能需要有一个参考DLL的System.Data.SqlServerCe.3.5,但我不确定。任何帮助将非常感激!

回答

0
  • 在你的项目属性,在发布选项卡,单击应用程序文件
  • 寻找System.Data.SqlServerCe.dll(可能通过检查显示所有文件框)。
  • 确保它的发布状态包括