我有一个Winform应用程序并且正在使用EntityFramework。应用程序在我的开发机器中运行得很好,但是当我尝试在客户端机器上运行时,我得到“指定的存储提供程序在配置中找不到,或者无效”错误。我已经与客户端分发了EntityFramework.dll。为什么我得到这个错误? 。我不把连接字符串中的app.config文件,因为它是基于在运行时选择的数据库上的动态创建(我使用VistaDB的数据库)EntityFramework,在配置中找不到指定的存储提供者,或者无效
在app.config低于:
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
</configuration>
可能的重复:http://stackoverflow.com/questions/8705108/mysql-entity-framework-error-the-specified-store-provider-cannot-be-found-in-t – Srinivas 2013-04-08 12:08:21
这真的看起来像一个错误connectionString问题。特别检查字符串的数据源部分,并确实对应于有效的数据库。 – Alkaline 2013-04-08 13:04:13
@Alkaline我没有在app.config文件中放入任何连接字符串。它在运行时动态添加。此外,该应用程序在我的开发机器中工作正常该错误只出现在客户端机器 – jeff 2013-04-08 13:37:21