I wrote a WPF application with a LocalDBV11.0. In production I have no problem testing my application, storing my data to the database and others action I can do against the database until I packaged the application to be distributed.
I get an Error message after I launched the newly installed application:
Error message:
System.Data.SqlClient.SqlException (0x80131904): An attempt to attach an auto-named database for file C:\MyData\database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
1- I made sure that SQL Server LocalDBv11 gets downloaded and installed if the customer doesn't have it on his machine.
2- I verified that the database was copied into the packaged application.
3- I verified that the permission of the database were Read And Write.
4- I have looked online and I couldn't found a clear answer; it looks li ...
Go to the complete details ...