I've recently built an app that makes use of the service-based database to store its data because the binding seems easy for a beginner.
Everything worked well in debug, but this error appears when I published it using the "click once install" publish option. Please note that I used the wizard and not the "Publish now" option, so the manifest is correct.
I've also checked in the prerequisites to install .Net Framework 4.8 & SQL Server Express Local DB 2012 before installing the app, and the installation also worked fine. I could see the SQL Server Running in task manager.
Publish settings:
SQL Server Running:
Here is the app.config code
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="Redo_V3.Properties.Settings.CNv3" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\RedoV3Database.mdf;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Please note that I've tested this app initially on a PC, and then on a VM in Virtual Box
Is there something wrong with my connection string? Or what could be the cause of this?
I think I found out why it wouldn't run on another machine.
My next obstable is, how do I make windows auto start an instance with that exact same name right after finishing installing SQL server?