2012-05-29 64 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(可能通過檢查顯示所有文件框)。
  • 確保它的發佈狀態包括