C#C
C#2mo ago
41 replies
Will

ADO.NET Error

Hi everyone, I'm running into an issue when trying to add an ADO.NET Entity Data Model in Visual Studio 2022.

I get a System.Data.Entity.Core.EntityException with the inner exception saying: "An attempt to attach an auto-named database for file ... failed. A database with the same name exists..."

It seems VS is looking for the .mdf file inside the VS Installation folder (Common7\IDE) instead of my project folder.

Has anyone faced this pathing issue before? Is this related to a bad connection string in Web.config or a LocalDB instance conflict? Any help is appreciated!
unnamed.jpg
Was this page helpful?