Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I try to add Service based databse in VS2020.

i got this Error Message:

Connections to SQL Server database files (.mdf) require LocalDB or SQL Server Express to be installed and running on the local computer. You may need to modify the setup and ensure Microsoft SQL Server Data Tools is selected and install the current version at: http://go.microsoft.com/fwlink/?Linkid=125883


What I have tried:

Add--->Newitem from VS2022---> Data---->select service based Database. add. i got bove Error

I did a fresh install of SQL Server Express 2018
I verified 'LocalDB' was included in the installation.
Tried to connect to a known working .MDF database file in Visual Studio 2022,
but always get the error message.
Posted
Updated 28-Jan-22 10:03am
v2
Comments
[no name] 28-Jan-22 13:08pm    
Start over.

https://docs.microsoft.com/en-us/visualstudio/data-tools/create-a-sql-database-by-using-a-designer?view=vs-2022
PIEBALDconsult 28-Jan-22 16:04pm    
You don't connect to the file; you connect to the SQL Server instance.

1 solution

The error message is very clear. In first part need to check the point-1
and for second error part you need to very the point-2.
1. LocalDB or SQL Server Express installed and running on the local computer
2. SSDT installed. To check follow [Tools > Extensions and Updates -> Installed > Updates]
If update not works then go the link https://msdn.microsoft.com/en-us/mt186501[^] download it and install into your system.
Happy Coding!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900