Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: The system cannot find the path specified

I am developing a website in ASP.NET MVC in Visual Studio. I'm trying to add a Database connection, but it gives me the error "The system cannot find the path specified".

Here's what I am doing:

  • Right Click on Models Folder
  • New Item > ADO.NET Entity Data Model
  • EF Designer from Database
  • New Connection (SQL Database connection test succeeds)
  • Choose the tables I want to include
  • Press Finish
  • Error Appears

The Output Window says the following:

Generated model file: Model1.edmx.
Loading metadata from the database took 00:00:01.3576925.
Generating the model took 00:00:01.3134936.

However, the Models Folder is empty and no connection strings are made. I have been trying for about an hour and nothing, deleted the .vs, bin, and obj folders, rebuilt the solution but nothing works. I appreciate any help you can provide.

like image 552
AxelSariel Avatar asked Dec 23 '22 19:12

AxelSariel


1 Answers

After much troubleshooting, I managed to fix the issue, details below:

  • Delete Models folder (backup any files inside)
  • Create a new empty Models folder
  • Add the new Model

Hope this helps anyone with this issue.

like image 195
AxelSariel Avatar answered Jan 12 '23 00:01

AxelSariel