作者:徐國煇_457 | 来源:互联网 | 2023-10-09 22:25
WehaveaconsumerappinthemarketthatusesClickOncedeployment.Wevehadvariousissuesovert
We have a consumer app in the market that uses ClickOnce deployment. 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. 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). 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.
我们在市场上有一个消费者应用使用ClickOnce部署。随着时间的推移,我们在ClickOnce上遇到了各种各样的问题,其中大多数问题已经得到解决,但总是有点后悔没有使用一个简单的MSI安装程序。我们特别希望能够提供适当的脱机安装(从盒装拷贝)和更好的多语言安装选项。我们刚刚更新了我们的测试版到一个AnyCPU构建后,终于得到了一些旧的32位dll依赖项(在你问之前——是的,我们的应用程序可以从内存地址空间的增加中获益,我们处理了很多数据)。当然,现在我们意识到从x86到任何cpu都不能使用ClickOnce,所以现在似乎是切换到另一种安装技术的理想时机。
SO here's the issue: we want to upgrade automatically to the new installer, from existing ClickOnce installations. We would also very much like to keep the user settings (.config) file. Not a total deal breaker if we can't, but it will irritate a lot of users if we don't.
因此,这里的问题是:我们想要自动升级到新的安装程序,从现有的ClickOnce安装。我们也非常希望保留用户设置(.config)文件。如果我们做不到,这也不是一件彻底的事情,但是如果我们不这样做,它将会激怒很多用户。
So the very rough gameplan is something like this:
所以大概的游戏计划是这样的:
Create a new version of the app and deploy via ClickOnce. This new version is basically a front-end for the MSI installer. 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进行部署。这个新版本基本上是MSI安装程序的前端。它以某种方式获取现有的用户设置,启动新安装程序的下载并调用它。然后将现有的设置复制到新的应用程序目录。然后卸载自己(它本身就是先前的,点击一次,安装应用程序)。
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.
应用程序是c#目标。net 4。
thanks, Matt
谢谢,马特
1 个解决方案