Windows窗体设置错误

时间:2016-10-05 13:19:56

标签: c# entity-framework installation

我有以下问题我使用Entity框架设置创建Windows窗体,当我安装并启动应用程序时收到错误消息:

  

在应用程序配置文件中找不到名为“PhonebookEntities”的连接字符串

我使用MS SQL Server 2012数据库和此App.config连接字符串

<connectionStrings>
   <add name="PhonebookEntities" connectionString="metadata=res://*/PhoneModel.csdl|res://*/PhoneModel.ssdl|res://*/PhoneModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=NT2\SQLEXPRESS1;initial catalog=Phonebook;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;"
  providerName="System.Data.EntityClient" />
  <add name="Phonebook1.Properties.Settings.PhonebookConnectionString"
  connectionString="Data Source=NT2\SQLEXPRESS1;Initial Catalog=Phonebook;Integrated Security=True"
  providerName="System.Data.SqlClient" />
</connectionStrings>

0 个答案:

没有答案