0

当我构建我的软件时,我是否可以将解决方案中的所有内容与软件安装程序合并(可能使用 InstallSheild?)

我目前正在编写的软件使用带有 SQL 的数据库,并且是用 C# 5.0 编写的,那么在安装软件时我将如何将数据库、SQL、C#、.NET 等安装到我的客户端计算机上?

4

2 回答 2

0

Yes, you can do that with an installer. InstallShield would do it but is quite pricey. Wix Toolset would do it and it's free, but it's not the friendliest installer I ever worked with (though it does work very well once you get the hang of it).

Both of those allow pretty straightforward installation of the .NET framework. You will need to work a bit at getting SQL installed.

While you could install SQL Server Full or Express this way it would be MUCH easier to use SQL Compact. I can't remember the license, but I'm pretty sure you can deploy the SQL Compact DLLs with your project and don't need to actually install it.

于 2013-10-04T05:10:15.510 回答
0

是的,您可以使用安装包部署SQL数据库。.Net frame work你也可以做到这一点Windows Installer

Deploying Sql database with MSI

你必须首先添加你sql script filemsi package脚本,当它在 SQL 数据库上执行时,它应该有必要的步骤来创建数据库模式。您可以使用SMO(Sql server Management Object)库在 sql 数据库上执行此脚本内容。检查我发布工作方法的其他线程以读取文件内容并在 SQL 数据库上执行以在部署期间创建数据库。

使用 C# 在 SQL Server 上执行 sql 脚本

Deploying .Net Frameowrk

转到MSI Project> Properties> Prerequisites> Download prerequsites from the same location as my computer

.Net 框架微星

当您使用此配置构建 MSI 项目时,您将获得一个额外的 exe 文件dotNetFx40_Full_x86_x64.exe,该文件可以在客户端机器上部署 .Net 框架。您可以在安装应用程序时执行此 MSI。

于 2013-10-04T07:38:49.527 回答