installationsetup-projectsetup-deployment

Microsoft VS Installer -> Install my Software and SQL database


I made a Setup.exe for my software using "Microsoft Visual Studio Installer Projects".

My software uses Microsoft SQL Server and I also need it to be installed, then I went in my Setup.exe properties and selected "SQL Server 2019 Express LocalDB" to be installed also, but when I run the setup, it doesn't install the SQL Server on my machine.

How can I make this Setup.exe to install my software and also SQL Server at same time?

enter image description here


Solution

  • When you build a setup project with prerequisites the resultant output contains two files one is Setup.exe and the other is your project name . msi. The setup exe is responsible to check for prerequisite installed on a user system and prompt to install one if it doesn't exists, after which it launches your MSI automatically.

    If you are using pre-available prerequisite in your project then they have system checks (if dependency already installed) pre-defined, but if you use your own bootstrap package then you have to write the checks for them yourself.

    What I am assuming here is that you already have sql server installed on your system that is why you are not getting a prompt for its installation. Otherwise on any other system where sql server will be missing the exe will install it.