我有以下问题我使用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="data source=NT2\SQLEXPRESS1;initial catalog=Phonebook;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework""
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>