[英]Strategy for moving from ClickOnce to MSI deployment
We have a consumer app in the market that uses ClickOnce deployment. 我们在市场上有一个使用ClickOnce部署的消费者应用程序。 We've had various issues over time with ClickOnce, most of which have been resolved, but kind of always regretted not going with a straightforward MSI installer. 随着时间的推移,我们遇到过各种各样的问题,其中大部分都已经解决,但总是很遗憾没有使用简单的MSI安装程序。 In particular we'd like to be able to offer proper offline installs (from a boxed copy), and better multi-lingual installation options. 特别是我们希望能够提供适当的离线安装(从盒装副本),以及更好的多语言安装选项。 We have just updated our beta to an AnyCPU build after finally getting shot of some old 32 bit dll dependencies (before you ask - yes, our app can really benefit from the increase in memory address space, we crunch a lot of data). 在最终获得一些旧的32位dll依赖项后,我们刚刚将测试版更新为AnyCPU版本(在您提出之前 - 是的,我们的应用程序确实可以从内存地址空间的增加中受益,我们处理大量数据)。 Now of course we realise that going from x86 to AnyCPU doesn't work with ClickOnce, so it seems like the ideal time to make the switch away to another install technology. 现在我们当然意识到从x86到AnyCPU不适用于ClickOnce,因此它似乎是切换到另一种安装技术的理想时间。
SO here's the issue: we want to upgrade automatically to the new installer, from existing ClickOnce installations. 这就是问题所在:我们希望从现有的ClickOnce安装中自动升级到新的安装程序。 We would also very much like to keep the user settings (.config) file. 我们也非常希望保留用户设置(.config)文件。 Not a total deal breaker if we can't, but it will irritate a lot of users if we don't. 如果我们做不到,那就不是一个彻底的交易破坏者,但如果我们不这样做,它会激怒很多用户。
So the very rough gameplan is something like this: 所以非常粗略的游戏规划是这样的:
Create a new version of the app and deploy via ClickOnce. 创建应用程序的新版本并通过ClickOnce进行部署。 This new version is basically a front-end for the MSI installer. 这个新版本基本上是MSI安装程序的前端。 It somehow grabs the existing user settings, sets off a download of the new installer and invokes it. 它以某种方式抓取现有的用户设置,启动新安装程序的下载并调用它。 Then it copies the existing settings to the new application directory. 然后,它将现有设置复制到新的应用程序目录。 Then it uninstalls itself (itself being the previous, ClickOnce, installation of the app). 然后它卸载自己(本身就是以前的ClickOnce安装应用程序)。
In principle I think that could work, but am unsure about how to go about it. 原则上我认为这可行,但我不确定如何去做。 Particularly the moving of the user settings to the new application, and self-uninstalling at the end. 特别是将用户设置移动到新应用程序,并在最后自行卸载。
If anyone has any tips, or has gone through a similar process, I'd be very keen to hear about it. 如果有人有任何提示,或经历过类似的过程,我会非常渴望听到它。
Application is c# targeting .NET 4. 应用程序是针对.NET 4的c#。
thanks, Matt 谢谢,马特
Create an msi version with the following features: 创建具有以下功能的msi版本 :
Create a new ClickOnce version which detects the msi installed version. 创建一个新的ClickOnce版本,用于检测msi安装的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.