I have the following error when I try to build my solution:
Could not find connection string named "TechnicalAnalyzerEntities" in application configuration file.
The fact is that:
1 / there is one:
<connectionStrings> <add name="TechnicalAnalyzerEntities" connectionString="metadata=res://*/Data.Database.TAdb.csdl|res://*/Data.Database.TAdb.ssdl|res://*/Data.Database.TAdb.msl;provider=System.Data.SqlClient;provider connection string="data source=PSYKOTROPYK-PC\PSYKOTROPYK;initial catalog=TechnicalAnalyzer;persist security info=True;user id=***;password=***;network library=dbnmpntw;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /> </connectionStrings>
2 / in my solution there is only one project (I'm looking for the same error when people have one project with a connection string and a start project without, well, not in my case)
3 / this error does not seem to prevent my project from starting, as well as the Entity Framework for accessing data and binding to my tree structure.
Actually, the only problem is that this error appears in my list of errors and in the MainWindow.xaml file (where the error is mentioned), which cannot correctly display the user control, which then needs this connection string ==> can not create instance of "TreeviewSelector". The fact is that the xaml user control (TreeviewSelector.xaml, you guessed it) displays correctly in the xaml editor.
This is not a dramatic mistake that prevents me from moving forward on my project, but it annoys me that I have errors and the inability to use the xaml editor correctly.
NB: A few other points that may be of interest: 1 / I am using Entity Framework 6.0 2 / The project is on my laptop and the database on my desktop 3 / Blend shows the same error MainWindow.xaml 4 / If I put a copy of my project to my desktop (so on the same system as my database), I have the same problem
c # wpf entity-framework connection-string
samuel guedon
source share