How to connect to LocalDB in Visual Studio Server Explorer?

entity-framework-6 localdb server-explorer sql-server-2012-localdb visual-studio

Question

After an hour of looking, I can't believe I couldn't come up with a workable answer to this. I'm following this piece on Entity Framework 6.0 because it provides a straightforward Code First walkthrough. To get the project to build, I built it and installed the most recent version of EF Nuget bundle. Additionally, I confirmed that the Microsoft SQL Server 2012 Express LocalDB that came with Visual Studio 2013 is installed. On my local PC, I don't have any further instances of SQL installed. As the application runs, new entries are produced in the console and added to the database. But the text doesn't specify how to check your localdb when it advises to do so. I don't see any newly created ".mdf" or ".ldf" files in the project folder. I made every attempt to link the Server Explorer in Visual Studio to LocalDB. The magician is unable to find(localdb) or you are unable to locate a provider in Server Explorer that will accept connection strings like(localdb)\v11.0;Integrated Security=true; This question has been posed multiple times on StackOverflow, but no satisfactory solution has been posted. Help! This doesn't have to be so frustrating, please!

How may Visual Studio Server Explorer be connected to LocalDB?

1
236
7/10/2015 7:33:00 AM

Accepted Answer

I'll now respond to my own query.

How to connect Visual Studio Server Explorer to LocalDB

  1. Launch the command prompt
  2. Run SqlLocalDB.exe start v11.0
  3. Run SqlLocalDB.exe info v11.0
  4. The Pipe instance name that begins with np: should be copied.
  5. Select TOOLS > Connect to Database in Visual Studio.
  6. Enter the server name.(localdb)\v11.0 . Use the Pipe instance name that you copied previously if it didn't work. Additionally, you can connect to SQL Management Studio using this.
  7. the database from the following drop-down list.
  8. Input OK.

enter image description here

252
6/13/2014 9:23:53 PM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow