为多个环境的 ASP.NET Web 应用程序创建安装程序
我创建了一个访问数据库的 ASP.NET 网站。 DB 可能已经安装在目标机器上。它可以是从 SQL Server 2000 到 SQL Server 2008 的任何版本。此外,目标操作系统可以是从 Windows Server 2000 到 Windows 7 的任何版本。为了简单起见,我将目标 .Net 框架版本保留为 .Net 2.0。此外,目标机器可以是 x86、x64 或 Itanium。
- 我需要为不同的目标平台创建单独的版本吗?
- 如何创建一个安装程序,它将:
- 将此网站放在 IIS 服务器的虚拟目录上(可以是任何 IIS 版本)
- 检测目标平台并安装适当的版本
我需要使用 VS2008 的标准 MSI 安装程序或使用WiX 或任何开源安装程序。由于我是部署项目的新手,请帮助我。
谢谢
I have created an ASP.NET website which accesses a DB. The DB can will be alrady installed at target machine. It can be anything from SQL server 2000 to SQL server 2008. Further more the target OS can be anything from Windows server 2000 to Windows 7. I have kept the target .Net framework version as .Net 2.0 to keep matters simple. Also, the target machine can be x86 or x64 or Itanium.
- Do I need to create separate builds for different target platforms?
- How do I create an Installer which will :
- Put this website on a Virtual Directory of IIS server(can be any IIS version)
- Detect the target platform and install the appropriate build
I need to do this either using the standard MSI installer of VS2008 or using WiX or any open source installer for that matter. Please help me with this since I am new to deployment projects.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 InstallShield 等软件来创建安装程序。但我认为 InstallShield 不是免费的。
此类程序有自己的脚本语言,可以简化您想要执行的操作,例如检测安装了哪个操作系统或安装程序是哪个 SQL Server 版本,此外它们还允许您与 dll 中的特定函数进行通信。您可以调用此函数来执行一些逻辑或一些验证。
You can use softwares like InstallShield in order to create your installer. but InstallShield is not for free I think.
such programs have their own scripting language that simplify the operations that you want to do, like detecting which operating system is installed or which SQL Server version is installer, beside that they allows you to communicate with a certain function in a dll. You can call this function to do some logic or some validation.
您可以使用 WiX 创建执行您所列出的操作的 MSI。它是免费的,并且包含您想要的功能,还允许为所需的任何自定义逻辑编写自定义脚本。
You can use WiX to create an MSI that does what you've listed. It is free, and as well as including functionality for what you want also allows custom scripting for any custom logic needed.