运行时静默更新应用程序
我的应用程序最初将使用 Windows Installer 进行部署。
我正在寻找的解决方案的主要特征包括:
在应用程序运行时支持静默更新 运行(或自动重启 客户端)
易于维护和管理包装 流程
避免复杂的定制或 安装脚本
您对如何实现此目标有什么想法吗?即使这意味着修改应用程序代码以支持任何想法。
应用程序是.net 2.0
My App will be initially deployed with Windows Installer.
The key characteristics of the solution I am looking for include:
Support silent update while app is
running (or automatically restart
client)Easy to maintain and manage packing
processAvoid complex customizations or
installation scripts
Do you have any ideas on how can I achieve this? Even if it means to modify the app code to support any idea.
Application is .net 2.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否考虑过使用 ClickOnce 进行部署?它具有以编程方式检查更新并可选择强制安装更新的功能 - 请参阅 http ://msdn.microsoft.com/en-us/library/ms404263.aspx
Have you considered using ClickOnce for deployment? It has a facility to programatically check for updates and optionally force them to be installed - see http://msdn.microsoft.com/en-us/library/ms404263.aspx
代理设计模式
将帮助您实现这一点,而这就是模式用于插件。另一个简短的解释是使用
四人帮 - 代理设计模式
。留意
卷影复制
程序集对于这一技巧绝对有用,当您将更新的程序集影子复制到应用程序程序集文件夹时,您可以使应用程序意识到更改,然后卸载旧程序集并加载新程序集以使更改生效,即,甚至无需重新启动应用程序,这对于最终用户来说是绝对透明的。更简单的方法可能是
ClickOnce 部署< /code>
您可能有兴趣阅读建议的链接。
The
Proxy Design Pattern
will help you achieve this while this is the pattern used for plugins.Another short explanation is with the
Gang of Four - Proxy Design Pattern
.Having an eye out the
Shadow Copying
of assemblies is definitely useful for the trick, as you shadow copy your updated assembly to your application assemblies folder, then you can make your application aware of changes, then unload the old assembly and load the new one for the changes to take effect, that is, without even having to restart your application, and this will be absolutely transparent for the end-user.A more simple approach might be the
ClickOnce Deployment
which you might be interested to read about following the sugested link.