title: Where to find .csdl, .ssdl, and .msl files in Entity Framework 4.0 code first?
body: <p>I want to run tests with Effort and to do that I need to specify a connectionstring that also contains a reference to <code>.csdl,</code> <code>.ssdl</code>, and <code>.msl</code> files. The (non-working) connectionstring looks like this now:</p>
  
  <pre><code>&lt;add name="SQLAzureConnection" connectionString=
   "metadata=res://*/Model.projectContext.csdl|
  res://*/Model.projectContext.ssdl|res://*/Model.projectContext.msl;
    provider=System.Data.SqlClient;
    provider connection string=&amp;quot;Data Source=(LocalDb)\v11.0;Initial Catalog=Database_Nieuw;Integrated Security=false;MultipleActiveResultSets=False&amp;quot;"
   providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>The <code>Model.projectContext</code> part are wrong but I do not know what it should be.</p>
  
  <p>When I use this string I get the following error on a test that uses this connectionstring to make a mock database connection with Effort.</p>
  
  <pre><code>Test: failed
  Result Message: Initialization method  
  project.Tests.Controllers.ShoppingCartTest.Initialize threw exception. 
  System.InvalidOperationException: System.InvalidOperationException: Resource res://*
  /Model.seashell_brawl_corveeContext.csdl not found..
  </code></pre>
  
  <p>I have no idea where I can find this <code>.csdl</code> file, I only know it is necessary. I cannot create them from my <code>.emdx</code> file because I have a code first database, and right clicking in designer does not give the option to <code>Update database from model</code> as <a href="https://stackoverflow.com/questions/7157965/entity-framework-create-the-csdl-ssdl-and-msl-files">another question</a> gave as a solution. I also set the <a href="https://stackoverflow.com/questions/9375124/specifying-location-of-csdl-ssdl-msl-metadata-files-within-the-output-ass">Metadata Artifact Processing" option to "Embed in Output Assembly</a>.</p>
  
  <p>Does anyone know where I can find these files and how I can reference them correctly?</p>
  
  <p>/Edit:</p>
  
  <p>Alright, it is clear to me now that the files do not exist in code first projects. By using the tip of user20... below in the comments the connection string seems to work now. A new issue is the following:</p>
  
  <pre><code>`Test Outcome:  Failed  error 0040: The Type date is not qualified with a namespace or 
  alias. Only primitive types can be used without qualification.` 
  </code></pre>
  
  <p>Very strange, since I use <code>[DataType(DataType.DateTime)]</code> everywhere. Does anyone know how to solve this?</p>