如何使用 Visual Studio 进行修补程序部署?

发布于 2024-07-06 05:04:50 字数 304 浏览 5 评论 0 原文

假设您有一个用 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

喵星人汪星人 2024-07-13 05:04:50

使用 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.

っ左 2024-07-13 05:04:50

您可以创建可以在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文