title: Entity Framework changed to SQL Server Express, how do I change it back to Localdb
body: <p>I am using EF Code First (.NET 4.5 + VS2012). My project was creating and using LocalDB correctly. I have SQL Server Express also installed on my machine (2008R2). I didn't change any configuration yet it switched to using SQL Server Express.</p>
  
  <p>I have now stopped my SQL Server instance and whenever I try to rebuild the database using <code>Update-Database</code> I get the following message:</p>
  
  <blockquote>
    <p><em>System.Data.ProviderIncompatibleException: An error occurred while
    getting provider information from the database. This can be caused by
    Entity Framework using an incorrect connection string. Check the inner
    exceptions for details and ensure that the connection string is
    correct. ---> System.Data.ProviderIncompatibleException: The provider
    did not return a ProviderManifestToken string. --->
    System.Data.SqlClient.SqlException: A network-related or
    instance-specific error occurred while establishing a connection to
    SQL Server. The server was not found or was not accessible. Verify
    that the instance name is correct and that SQL Server is configured to
    allow remote connections. (provider: SQL Network Interfaces, error: 26
    - Error Locating Server/Instance Specified)</em></p>
  </blockquote>
  
  <p>My configuration file has the following EF configuration:</p>
  
  <pre><code>&lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
    &lt;parameters&gt;
      &lt;parameter value="v11.0" /&gt;
    &lt;/parameters&gt;
  &lt;/defaultConnectionFactory&gt;
  </code></pre>
  
  <p>Any advice? I'd prefer to be using Localdb rather than SQL Server Express. </p>