假设您有一个用 Visual Studio 编写的产品,并且您为客户和用户提供了该产品的安装程序。
然后,您想要将一些小的更改部署给您的用户; 您不希望您的用户必须经历卸载过程、备份配置,然后再次重新安装产品并恢复配置。
相反,您希望提供一个“修补程序”,用户可以简单地复制已安装的产品。 使用 Visual Studio 或某些 Microsoft 工具,您将如何解决这个问题?
我不知道这是否重要,但可以说该产品 1) 部分是 Web 应用程序,2) 部分是 Windows 服务,3) 部分是 Windows 应用程序。
Let's say that you have a product that is written in Visual Studio and you provide your customers and users with an installer for that product.
Then, you have some minor changes that you want to deploy to your users; you don't want your users to have to go through an uninstall process, backing up the configuration and then reinstalling the product again and restoring the configuration.
Instead, you want to provide a "hot-fix" that the users can simply copy over the already installed product. Using Visual Studio or some Microsoft tools, how would you go about this?
I don't know if it matters, but lets say that the product is 1) partially a web application, 2) partially a windows service and 3) partially a windows application.
发布评论
评论(2)
使用 WiX。
它可以处理所有这些事情(安装 Web 应用程序、服务等),而且非常灵活、免费,微软就是用它来构建安装程序的。
您可以安装 Votive 以在 Visual Studio 内使用 WiX。
如何准确地执行您所要求的操作的细节有点复杂,并且取决于具体情况。 一般来说,您需要构建初始 MSI 才能获得升级代码。 然后,后续的升级安装程序将使用相同的产品代码和升级代码,但更改版本。 您可以阅读教程的第 4 部分。
如果您已有安装,它们可能已设置或尚未设置升级代码。 您可以使用 ORCA (MSDN 如何在此处)。
这也可以通过 Visual Studio 中内置的 .Net 安装项目来完成,但我建议不要这样做。 它们不像 WiX 那样灵活。 如果您关心您的安装,并且有像您所描述的那样复杂的安装,那么 WiX 是最好的选择。
Use WiX.
It can deal with all those things (installation web applications, services, etc), and it's very flexible, free, and it's what Microsoft uses to build their installers.
You can install Votive to work with WiX inside of Visual Studio.
The details of how to do exactly what you're asking is a bit complex, and depends on the specifics of the situation. In general, you need to build your initial MSI to have an upgrade code. Then, subsequent upgrade installers will use the same product code and upgrade code, but change the version. You can read the details of how to do this with WiX as part 4 of the tutorial.
IF you have existing installs, they may or may not have an upgrade code already set. You can find out by examining them using ORCA (MSDN how to here).
This can also be done via the .Net Setup projects built into Visual Studio, but I advise against that. They are not as flexible as WiX. If you care about your installation, and have something as complicated as what you're describing to install, WiX is the best way to go.
您可以创建可以在 Visual Studio 中处理此问题的部署项目。 这些会产生一个 MSI(或可能多个 MSI),可以在客户端计算机或服务器上运行并执行升级。
You can create deployment projects that can handle this in Visual Studio. These result in an MSI (or potentially multiple MSIs) that can be run on client machines or servers and perform the upgrade.