I have a WPF application with Entity Framework connected to SQL Server 2017. I'm going to give my client a trial/demo version for testing. Since I don't want to overwhelm him with installing a full SQL Server right now, I'm adding the .mdf
database to the root directory and trying to use the SQL Server LocalDB solution to hook things up.
So I deploy the software using Advanced Installer and add all the prerequisites. When I install it in the machine that I'm coding in, the program works fine, but as soon as I try other PCs it doesn't go nowhere. There is a log in window at the beginning where after putting the credential, the window either disappear or in some cases becomes not responding.
I tried a bunch of different types of Connection strings, but no luck so far. Here is the main connection string:
<add name="IncomsDatabase"
connectionString="Server=(LocalDB)\MSSQLLocalDB; Integrated Security=true ;AttachDbFileName=|DataDirectory|\Incoms.mdf"
providerName="System.Data.SqlClient"/>
I even changed the |DataDirectory|
to the direct location of the root folder but it didn't work either.
I also tried different versions of SQL Server LocalDB like, 2017, 2016 and 2014 but without success.
It would be really appreciated if somebody can come up with a workaround.