'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



Sources

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

Source: Stack Overflow

Solution Source