Reputation: 51
I hope you all are well!
Visual Studio 2017 - WIN-FORM - C#
I added a Setup Project to my app. I also selected as prerequisites SQL Server 2019 Express LocalDB:
The installer installs the app just fine but does not install the prerequisites SQL Server 2019 Express LocalDB. There are no popup error messages displayed or any in the Event Viewer.
If I download SqlLocalDB, I install it just fine and my app works. But I would like to have it install during the setup installation if it is needed (auto detect).
I tried on various computers and it also doesn't install SqlLocalDB.
I cannot find anything on the Internet that would explain why setup is not installing the prerequisites.
Any suggestion is appreciated.
Regards,
Upvotes: 0
Views: 1093
Reputation: 31
As correctly said above the issue is to do with the fact that .msi installer does not handle prerequisites even if you specify it in the properties in setup project.
Use setup.exe file instead, as it will prompt user to install all specified prerequisites.
But there is an issue that you need to supply both files then (setup.exe and setup.msi). I found a How do I make a self extract and running installer , where it is described how you need to package these files in self-extracting archive and configure it to launch setup.exe by default automatically upon extraction completes.
Upvotes: 0
Reputation: 51
The issue was that I was using the .MSI instead of the .EXE file to install the app. Using the .EXE did in indeed prompt the user to installSqlLocalDB.
Solution here:
Upvotes: 3
Reputation: 66
Setup projects are no more supported starting from VS 2019. So if it's a new project - you might want to try WiX toolset project. There you can add checking of prerequisites to be installed on the MSI level, or you can create your Bootstrapper bundle, which will contain installation for both SQL Server and your own app
Upvotes: 0