Here are two tips on how to verify if you have locally installed localdb with Visual Studio 2017.
First Tip:
Run through a command line tool for this we need to open Developer Command Prompt for VS 2017 by clicking start and searching for it.
This CMD is special because it is installed with Visual Studio 2017 so that certain executables are in the PATH and one that we are going to use is sqllocaldb
Write the following command into cmd sqllocaldb info
This command is listing all the local intances of sql server localdb.
Second Tip: Open Visual Studio. On the top menu bar click on View-> Sql Server Explorer Object Explorer.
On the left side where the explorer opened, under Sql Server, you should see an instance with a name of MSSQLLocalDB. If not checkout the picture with instructions below.
Firstly click on the server icon with plus sign. Then a new window will open and choose mssqllocaldb if it is installed.
Otherwise you need to install it with Visual Studio installer.
Thats that..