'How can I Install C# desktop app with SQL Server database on client machine without installing SQL Server

I have a desktop app developed in C# with SQL Server and I want to deploy the app on client Machine.

How to compile the app into setup files? I have SQL Server Express installed on client machine.



Solution 1:[1]

When you compile the app you will need to have the connection string to the database that exist on the client machine. Also ensure the correct tables and what not are in there too. You can compile the app for release by right clicking the solution and then clicking publish. You can then publish a release version for production that can be used on client machines.

You will have to do this for every client machine.

Some options to make this easier might be as follows:

  1. Create a shared instance of SQL Server that all clients can connect to
  2. Use a nosql solution like litedb or something else.
  3. Store the data locally in another fashion.

Hope this helps! Leave comments if you are confused on anything.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mathis1337