Include SQL Server Express in setup project

2019-09-11 11:09发布

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?

3条回答
唯我独甜
2楼-- · 2019-09-11 11:21

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.

查看更多
何必那么认真
3楼-- · 2019-09-11 11:33

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/

查看更多
迷人小祖宗
4楼-- · 2019-09-11 11:40

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?

查看更多
登录 后发表回答