problem with connection string

Oct 6 2016 9:30 AM
Hi, i have problem with my win form entity framework based&nbsp; application. When i run program everything is ok but when i create and install setup have problem. I start application and receive error message:<span name="subject" style="font-size: 14pt;"><br />No connection string named "PhonebookEntities" could be found in the application config file<br /></span><div>I use SQL Server 2012 with server name:<strong> NT2\SQLEXPRESS1 </strong>and DBcontext name= <strong>PhonebookEntities</strong><br /><div class="dp-highlighter"><ol start="1" class="dp-xml"><li class=""><span><span class="tag">&lt;</span><span class="tag-name">add</span><span>&nbsp;</span><span class="attribute">name</span><span>=</span><span class="attribute-value">"PhonebookEntities"</span><span>&nbsp;</span><span class="attribute">connectionString</span><span>="meta</span><span class="attribute-value">data</span><span>=res://*/PhoneModel.csdl|res://*/PhoneModel.ssdl|res://*/PhoneModel.msl;provider=System.Data.SqlClient;provider&nbsp;connection&nbsp;string="data&nbsp;</span><span class="attribute">source</span><span>=</span><span class="attribute-value">NT2</span><span>\SQLEXPRESS1;initial&nbsp;</span><span class="attribute">catalog</span><span>=</span><span class="attribute-value">Phonebook</span><span>;integrated&nbsp;</span><span class="attribute">security</span><span>=</span><span class="attribute-value">True</span><span>;</span><span class="attribute">MultipleActiveResultSets</span><span>=</span><span class="attribute-value">True</span><span>;</span><span class="attribute">App</span><span>=EntityFramework</span><span class="attribute-value">""</span><span>&nbsp; </span><span class="attribute">providerName</span><span>=</span><span class="attribute-value">"System.Data.EntityClient"</span><span>&nbsp;</span><span class="tag">/&gt;</span><span>&nbsp; <br /></span></span></li></ol></div></div><div><span name="subject" style="font-size: 14pt;"></span> <img src="https://i1.social.s-msft.com/globalresources/Images/trans.gif?cver=0%0d%0a" alt="" /></div><div>What i make wrong?</div><div>&nbsp;</div><div> </div>

Answers (3)