我有一個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