I create project in Visual Studio. My app use .mdf
files. I created a setup project using InstallShield. On my computer where I developed my app, setup works just fine!
But when I install app on another machine I get an error
you need install SQL Server Express
How to embed SQL Server Express into my setup project?
You need to install SQL Server on your computer, Visual Studio can not embed this. Go to https://msdn.microsoft.com/en-us/sqlserver2014express.aspx, download and install. I'm not sure if you can get it without a Microsoft account.
Visual Studio publishing tool can do that. If you're required to use InstallShield, there's a guy who ensembled a video guide: http://www.installationdeveloper.com/3356/how-to-install-sql-server-2008-express-r2-in-installshield/
By using
.mdf
you got a dependency on SQL Server Express (at least). You might want to pack your database to a server and have your app just use client libraries or you could switch to SQLite or something with less footprint.Also take a look here how to bundle your setup with SQL Server Express: Can I deploy SQL Server Express with my desktop application just like builtin database?