Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install LocalDB 2016 along with Visual Studio 2017?

Tags:

After installing Visual Studio 2017 with the SQL Server Data tools feature checked, I noticed LocalDB was not installed. How can I add SQL Server LocalDB 2016 to my Visual Studio 2017 installation? Did I miss a checkbox when installing VS2017, or is it simply not included with the installer? If so, how do I configure VS2017 so I can view and connect to my manually installed LocalDB database in Visual Studio's server browser?

like image 250
Rudey Avatar asked Mar 13 '17 22:03

Rudey


People also ask

How do I install LocalDB on SQL Server 2016?

Install LocalDB through the installation wizard or by using the SqlLocalDB. msi program. LocalDB is an option when installing SQL Server Express LocalDB. Select LocalDB on the Feature Selection/Shared Features page during installation.

Does Visual Studio 2017 include SQL Server?

The software includes other Microsoft SQL Server technologies, Microsoft Visual Studio 2017, . NET Framework, Visual C++ Redistributable for Visual Studio 2017, and Microsoft Report Viewer 2016 Runtime in conjunction with the software licensed here.


2 Answers

It's automatically installed if .NET Desktop Development is checked. You can check it in the Summary. Visual Studio 2017 installation wizard

like image 125
pinowthebird Avatar answered Sep 18 '22 06:09

pinowthebird


SQL Server Express 2016 LocalDB is in .NET desktop development. If you missed it to select while installing Visual Studio 2017, you can select and install it later.

To install SQL Server Express 2016 LocalDB, go to Start in your Windows OS, type Visual Studio Installer and run it. Then click Modify. It will open the Workloads selection screen where you can select .Net desktop development. .Net desktop development includes SQL Server Express 2016 LocalDB. After selecting, click Modify and you are done.

But although you select .NET desktop development, it may not install. Because SQL Server 2016 or later is not supported for many processors. To check this, visit Hardware and Software Requirements for Installing SQL Server If this is your case, then you have to depend on SQL Server Express 2014 LocalDB or previous.

To install SQL Server Express 2014 LocalDB manually, download the installer from Microsoft® SQL Server® 2014 Service Pack 2 (SP2) Express and install SQL Server Express 2014 LocalDB by running the installer.

To connect to LocalDB, open Server Explorer in Visual Studio, right-click on Data Connections-> Add Connection. Enter Server name: (localdb)\MSSQLLocalDB and Test Connection. If test is success, click OK and you are now connected.

like image 33
Jobayer Ahmmed Avatar answered Sep 22 '22 06:09

Jobayer Ahmmed