How to install LocalDB 2016 along with Visual Studio 2017?

后端 未结 9 1687
甜味超标
甜味超标 2020-12-15 19:49

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 S

相关标签:
9条回答
  • 2020-12-15 20:11

    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.

    0 讨论(0)
  • 2020-12-15 20:11

    If you use Visual Studio Installer and select only .Net desktop development,it will uninstall all workloads you had before. It's a lengthy process beware.

    0 讨论(0)
  • It is a component under the .NET desktop development workload.

    0 讨论(0)
  • 2020-12-15 20:17

    It's automatically installed if .NET Desktop Development is checked. You can check it in the Summary.

    0 讨论(0)
  • 2020-12-15 20:17

    If you choose

    ASP.NET and web development

    then the option

    SQL Server Express 2016 LocalDB

    will also be checked and installed.

    0 讨论(0)
  • 2020-12-15 20:21

    New to the conversation, but wanted to share what I ran into because it may not be apparent that localdb was installed already. Here's another step you can take to verify.

    I ran into this same issue and found out that I'd already installed localdb via desktop.

    I was getting a connection string error and thought I did something wrong, but what I ended up doing is opening the SQL Server Object Explorer from within Visual Studio and sure enough, it was there.

    Shortcut, Ctrl+\ & Ctrl+S, or View -> SQL Server Object Explorer.

    0 讨论(0)
提交回复
热议问题