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?
It's automatically installed if .NET Desktop Development is checked.
You can check it in the Summary.
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.
It is a component under the .NET desktop development workload.
As others have pointed out, LocalDB is automatically included if you select certain workloads, such as Desktop or ASP.Net.
However, you may not want one of those workloads. You may just want to add LocalDB.
In the Visual Studio Installer, navigate away from the Workloads tab to the second tab (Individual components). Here, the individual items are listed alphabetically, and can be selected or deselected for installation:
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.
If you choose
ASP.NET and web development
then the option
SQL Server Express 2016 LocalDB
will also be checked and installed.
I have the same issue here, I followed the accepted answer but I think nothing has been installed. I followed the installer, and everything was checked ever since I installed my Visual Studio 2017 Professional Edition:
After all successful installation, and tried to modify it again using the installer, it will show the that I need to download the same tools which I installed multiple times. In other words, I have the same window as my image I showed above even though I already installed and modified it several times. And LocalDb still is not yet installed.
So I directly downloaded it here, you can even choose your own version: SQL Server Express LocalDB
Then upon successful installation using the link above, I was now able to confirm that LocalDb has finally installed on my machine.
To query, run command prompt and input:
I know this is a little different that what is asked, but the symptom is similar so I'm posting this. I figured out what I was missing. I was following a tutorial on Pluralsight, Bethany's Pie Shop, "Building Your First ASP.NET Core 2.0 MVC Application VS 2017", and tried running the solution downloaded. I had a failed login message... I re-watched a couple of the videos. This is what I was missing. I needed (in VS) to go to View->other windows->PkgMgrConsole
- Make sure you've built the application (build solution at top of VS)
- in console at bottom.... add-migration InitialMigration
- in console.... update-database
- run program
The person asking this didn't say how he got to the point that he thought he didn't have localDb installed. I checked, and I had it installed, but it was giving me a failed login message when I tried running the program without these steps.
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.
I have visual studio 2010 installed and working on my computer.
recently I have updated sql express 2008 to sql 2012. after visual studio prompted
"this server version is not supported. only servers up to Microsoft SQL
server 2008 are suported"
I have installed sql server data tools (from here https://msdn.microsoft.com/en-us/jj650014) to solve this problem, however unfortunately it keeps showing the message.
What am I doing wrong? How do I solve this?
Your best bet will be to install the latest version of SSDT from Microsoft. VS DB Projects stopped support with SQL 2008. SSDT for SQL 2010 stopped support w/ SQL 2012, I think. You don't need a license for the VS shell, though you might need to sign up w/ the MS developer program.
Go here for the SSDT blog: https://blogs.msdn.microsoft.com/ssdt/ You should see the most recent post or two pointing to the current release. This should support 2012+ without any issues. It will install the VS IDE if you don't have it installed.
FYI, the version you pointed to should work with SQL 2012, but you'd be better off using the latest version that is currently under active development. Ideally, the dacpac should be able to be used regardless of which version of SSDT you're using.
It might be worth checking to see what you're turning in. If you can turn in a script, it won't matter what version of SSDT you use. If you need to turn in the dacpac, you might have to double-check your install for SQL Express and SSDT to be sure they are the proper versions.
I installed Visual Studio 2010 on my home computer so I could do a little work from home. After having some issues with SQL Server Express, which got installed by VS2010, I got a copy of SQL Server 2008 R2 from my company. Let me openly admit I know jack about DBA in SQL Server.
At first it sort of worked, but seemed like I needed to rename the database name every time I opened it. Now VS2010 won't even open the connection at all. I keep getting an error stating one is version 661 and the other is 655 and they're not compatible. To make matters worse, I can't even attach the database in SQL Server 2008 R2 anymore.
Any ideas on how to rectify this? Please oversimplify and assume I'm an idiot, because in this case I am.
OK, well apparently VS2010 installs SQL Server 2008 Express on your computer, with which it will happily communicate. Since I then installed SQL Server 2008 R2 after that, 2008 R2 is considered an upgrade and SQL databases are not backwards compatible.
In order to fix this, I installed SQL Server Express 2008 R2 (specifically the SQLEXPRWT_x86_ENU.exe file as that one comes with additional tools) and after a reboot I was able to successfully add the database to my VS project.
NOTE: I did not remove SQL Server 2008 R2, I merely upgraded SQL Server 2008 **Express*.
As an aside, before doing this I could never have VS and SQL Server 2008 R2 open simultaneously. After this upgrade, I can have them both open at the same time which is how it should work.
I have SQL Server 2008 Express on my pc, and I want to install SQL Server 2012 instead. Do I have to uninstall SQL Server 2008 Express first? Do I have to backup my databases first?
Same question about VS 2010. I have VS 2010 Professional and I want to install VS 2012 Professional. Do I have to uninstall VS 2010 first?
Thank you.
Here is my own suggestion :-
For sql server make backup of database and for Visual studio make backup of settings. Settings can be accessed through My document/Visual studio 2012/Settings Same way you got settings for sql server management studio.
Having backup of setting make it easier to move to new version. Now uninstall both and restart your computer.
After restart install both thing. It will be worked.
if you want both version you can have it. Both software provide side by side installation. Remember that you maybe got some panic experience to have two database server on same computer.
You can 2008,2010 both version without any conflict.
I am doing a custom install of Visual Studio 2010 onto a new development box.
The target machine already has SQL Server 2008 R2 SP1 installed.
I see one of the components is SQL Server 2008 Express Service however this machine already has SQL Server installed on it. Its a 1.6 GB disk space savings plus I dont like to add unnecessary services (or installs) if I do not have to.
So my question is, would I want to still install the "express service" even though I have the full Developer Version of SQL Server 2008 R2 already installed? And if so, why? Is there a future benefit or is this somewhat redundant and can I save space and keep this box better tuned?
Just wanted to update this as I eventually learned that I did not need to install the express service of SQL Server 2008 because I already had the full developer version installed. There have been no ill effects and I was able to save the disc space required for the express service plus the RAM needed to run and maintain that instance.