Well xpoprovider is for DevExpress, you need to use their support center as this is not a standard connection string setup.
VS Setup Project - SQL Database can't connect
After installation application can't connect to LocalDB file.
What I did wrong
On Setup Project I've added Prerequisites to
- Microsoft .NET Framework 4.7.2
- SQL Server 2012 Express
- SQL Server 2019 Express LocalDB
And Inside my Application Folder , I've added my Database.mdf file.
After installation I got everything in same folder, and Database.mdf is on same location where is my main.exe located.
Under services i have : SQL Server (SQLEXPRESS) up and running.
My app.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="fdb_Connection" connectionString="xpoprovider=MSSqlServer;data source=(LocalDB)\MSSQLLocalDB;AttachDBFilename=|DataDirectory|\Database.mdf;integrated security=True" />
<add name="localConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\Database.mdf" providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Error i got is :
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 56 - Unable to load the SQLUserInstance.dll from the location specified in the registry. Verify that the Local Database Runtime feature of SQL Server Express is properly installed.)