It's amazing i couldn't find a solution for this one after an hour of searching I'm following this article on Entity Framework 6.0 which gives a simple walk-through on Code First. I created the project and installed the latest EF Nuget package for the project to compile. I also verified that i have microsoft sql server 2012 express localdb installed which came with visual studio 2013. I don't have other instances of sql installed on my local computer The program runs and the entries are added to the database and outputted in the console But when the article says "check your localdb" it doesn't say how! I don't see any '.mdf' or '.ldf' files created under the project folder. I've tried every way to connect visual studio server explorer to localdb The wizard cannot locate (localdb) or cannot find any provider in Server Explorer to accept connection string like (localdb)\v11.0;Integrated Security=true; I've seen this asked several places in StackOverflow but no answer works or marked as answer. Please help it doesn't have to be this frustrating

What's the best way to connect visual studio server explorer with localdb?

Best Answer

In Visual Studio 2012 all I had to do was enter.


Visual Studio 2015 and Visual Studio 2017 changed to.


as the server name when adding a Microsoft SQL Server Data source in.

View/Server Explorer/(Right click) Data Connections/Add Connection

and then the database names were populated. I didn't need to do all the other steps in the accepted answer, although it would be nice if the server name was available automatically in the server name combo box.

You can also browse the localdb database names available on your machine using this

View/SQL Server Object Explorer.