[英]Deploying a project with a SQL Server CE database
I am trying to deploy an application that uses a .SDF
file and the Entity Framework. 我正在尝试部署使用
.SDF
文件和Entity Framework的应用程序。 Whenever the deployed application tries to use the entity (connect to the DB) I get the error: 每当已部署的应用程序尝试使用实体(连接到数据库)时,我都会收到错误消息:
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.System.ArgumentException:无法找到请求的.Net Framework数据提供程序。 It may not be installed.
它可能没有安装。
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)在System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)在System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
My connection string looks like this: 我的连接字符串如下所示:
<add name="DBEntities"
connectionString="metadata=res://*/DB_Model.csdl|res://*/DB_Model.ssdl|res://*/DB_Model.msl;
provider=System.Data.SqlServerCe.3.5;
provider connection string="Data Source=|DataDirectory|\Database\DB.sdf""
providerName="System.Data.EntityClient" />
I have read somewhere that I may need to have a reference to the dll for System.Data.SqlServerCe.3.5
but I am unsure. 我在某处阅读过,我可能需要参考
System.Data.SqlServerCe.3.5
的dll,但不确定。 Any help would be much appreciated! 任何帮助将非常感激!
您需要在目标系统上安装3.5 SP2运行时,或按此处所述使用私有部署: http : //erikej.blogspot.com/2012/05/private-deployment-of-sql-server.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.