Problem statement
I have copied my local database (.mdf file) from one project into another. When I try to connect to the copied local database, it says it does not exist and it doesn't even show the database name.
Some background
I have made an ASP.NET and ADO.NET app in my previous project. And now, I need that same database that was used (with the data intact and all) in the previous project to be in a WCF project, which is another project.
Images of the problem
Image 1: Setup
Image 2: The error (when I click on "Test Connection")
As you can see, the database does exist in my current project (first image) but Visual Studio does not find it. What is wrong here?
I found that my folder, where my project and solution are located where for some reason placed in the wrong directory.
With that said, I couldn't find the .mdf file to connect to because I was looking at the wrong area of my computer. Now that I moved my folder to the correct location, I was able to access the .mdf file and connect to it.
This solved my issue.