behaviour driven blog
I spent way too much time today trying to figure out why I could not connect to my newly installed SQL Server LocalDB 2014 instance. I assumed that I could just update my connection string from v11.0 to v12.0 but it seems that Microsoft have changed the naming scheme for this version. Now the automatic instance is named MSSQLLocalDB.
So, for SQL Server 2012 LocalDB, I had this connection string:
<connectionStrings>
<add name="SchoolContext"
connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\ContosoUniversityDB.mdf;Integrated Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
For SQL Server 2014 LocalDB the connection string should be:
<connectionStrings>
<add name="SchoolContext"
connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\ContosoUniversityDB.mdf;Integrated Security=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
According to Microsoft
In SQL14, we moved away from the numbering/versioning for the automatic instance and named it "MSSQLLocalDB" instead of "v12.0".