I am using EF Code First (.NET 4.5 + VS2012). My project created and used LocalDB correctly. I also have SQL Server Express installed on my computer (2008R2). I did not change the configuration, but switched to using SQL Server Express.
I stopped my instance of SQL Server and whenever I try to rebuild the database using Update-Database , I get the following message:
System.Data.ProviderIncompatibleException: An error occurred while retrieving provider information from the database. This may be caused by the Entity Framework using the wrong connection string. Check the internal exceptions for details and ensure that the connection string is correct. ---> System.Data.ProviderIncompatibleException: the provider did not return the ProviderManifestToken string. ---> System.Data.SqlClient.SqlException: network-related or an instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not available. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL network interfaces, error: 26 - Server / instance location error)
My configuration file has the following EF configuration:
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <parameters> <parameter value="v11.0" /> </parameters> </defaultConnectionFactory>
Any tips? I would rather use Localdb rather than SQL Server Express.
source share