title: C# ConnectionString for EF Repository Class Library
body: <p>I have a database and a C# class library which acts as a repository for accessing objects from the database using Entity Framework. When trying to use this repository assembly in other projects I am running into difficulty; My working assumption is that this it due to the Connection String as I am getting the following error:</p>
  
  <blockquote>
    <p>The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.</p>
  </blockquote>
  
  <p>I have added an App1.config file to the project and added the same connection string I had successfully used when creating the database:</p>
  
  <pre><code>&lt;add name="EDSEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SQLite;provider connection string='data source=&amp;quot;C:\Documents and Settings\hmay\My Documents\My Projects\Timetabler\DataSets\EDS.db&amp;quot;;foreign keys=true'" providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>.... but it doesn't work. I don't understand the connection string very well and wondered if there is something else here I might need to tweak?</p>
  
  <p>Regards</p>