0

i'm tring to publish my desktop application (Winform application) that i used SQL SERVER 2008 on development. So befor set a setup project to my application i create an "App_Data" folder on my application and copy the .mdf file on it

then i modifier the connectionstring on "App.Config" file like this

<add name="ApplicationPCLMEntities" connectionString="metadata=res://*/Model.PCLM.csdl|res://*/Model.PCLM.ssdl|res://*/Model.PCLM.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\ApplicationPCLM.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>

I'um using EntityFramework

so when i run the application i get this error

failure of the underlying provider of open
Mokhtar_Nebli
  • 93
  • 1
  • 3
  • 12

1 Answers1

0

if you are using local db then there is no need for creating appdata folder because it is already present in there instead try

  <add name="ApplicationPCLMEntities" connectionString="Data Source=.; Initial Catalog=ApplicationPCLM ;Integrated Security=True" providerName="System.Data.SqlClient"/>