So, with my edmx (MyDatabase.Edmx) file, whenever I update model from database and I rebuild the project, it creates a duplicate designer file (MyDatabase1.Designer.cs). Was wondering if anyone knows of a config file to avoid creating the duplicate file? It happens on my local for dev purposes, my other teammates doesn't get the same issue.
I know this is an old question but I was facing the same problem and found how to resolve it properly. If you look inside the project file containing your .edmx file (so open the .csproj file in any text editor) you'll see many occurrences of the .Designer.cs file name (MyDatabase1.Designer.cs in your case). Change them to MyDatabase.Designer.cs and rename MyDatabase1.Designer.cs file to MyDatabase.Designer.cs to fix the problem.
Looks like you have MyDatabase.Designer.cs included in your project as a regular source file. Just exclude it, delete MyDatabase1.Designer.cs and rebuild the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With