LocalDB not recognized in Visual Studio 2015

jmk22 picture jmk22 · Oct 22, 2015 · Viewed 21.7k times · Source

I'm trying to create a database-first ASP.NET MVC app with Entity Framework in Visual Studio.

Starting with a blank project template, I open up the Server Explorer and try to add a data connection. I use Microsoft SQL Server as the Data Source, and "(localdb)\v11.0" as the Server Name. This gives me the error:

"The Data Source value in the connection string specifies an instance of SQL server that is not installed. To resolve the issue, either choose to install the matching instance of SQL Server or modify the Data Source value in the connection string."

The tutorial I'm following (and a few other places I've googled) mentions that localdb is installed with Visual Studio. Either way, I have also installed LocalDB found here but it's not showing up.

I've tried following the directions in this post, but get the error "Cannot create an automatic instance."

How do I get Visual Studio to connect to LocalDB?

Answer

Saravana picture Saravana · Oct 22, 2015

The default instance name is changed to (localdb)\MSSQLLocalDB independent of version numbers for VS 2015.

More info here: http://thebillwagner.com/Blog/Item/2015-02-05-VersionindependentlocalDBinVisualStudio2015