申请更新的最佳方法 [英] Best Way For Update Application

查看:69
本文介绍了申请更新的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WPF技术开发游戏。
我想每三天为游戏添加新功能。
的更新大小对我来说很重要。
我的游戏需要联网才能启动。就像在线游戏一样。
的另一个挑战是更新的大小。
最重要的说明:
我需要更新程序不需要停止。
您的建议是什么?
clickonce是一个不错的选择吗?
感谢您的关注。
请给我指导。

I am developing a game with WPF technology. I want to add new Features to game every third days . the size of update is important for me. my game needs to internet for start. like an online game. another challenge is size of updates. the most important note : I need to update of the program does not needing stop. what is your suggestion? Does clickonce is good option? thanks for your attentions. give me guideline please.

推荐答案

ClickOnce部署会进行增量更新。部署更新时,如果文件的日期/时间戳和哈希与上一个版本相同,则ClickOnce会将它们从缓存版本复制到新版本中,而不是通过Internet复制它们。

ClickOnce deployment does incremental updates. When you deploy an update, if the date/time stamp and hash of the file are the same as the last version, ClickOnce copies them from the cached version into the new version instead of copying them across the internet.

如果您在一个解决方案中有多个项目,则ClickOnce每次都会部署每个项目,因为在构建解决方案时会重新编译它们并对其进行重新整理。但是,如果您有一些您认为不会改变很多的项目,则可以将它们放在单独的解决方案中,进行构建,并将dll包含在主应用程序中。这样一来,您每次发布时都不会重建和重新映射,也不会在互联网上再次复制。

If you have several projects in one solution, ClickOnce will deploy each of these every time, because they are recompiled and rehashed when you build the solution. BUT if you have projects that you do not think will change a lot, you can put them in a separate solution, build them, and include the dll in the main application. Then it won't be rebuilt and rehashed every time you publish, and won't be copied across the internet again.

从互联网开始,您可以指定要求该应用程序只能在线运行,这要求用户能够连接到deploymnet清单(.application文件),并且每次运行时都可以检查更新。

As for starting from the internet, you can specify that the application be run online-only, which requires that the user be able to connect to the deploymnet manifest (.application file) and be able to check for updates every time he runs it.

请注意,大多数人将ClickOnce设置为检查更新并在运行前安装更新,以确保客户始终运行最新版本。

Note that most people set ClickOnce to check for updates and install them before running, which ensures the customer is always running the most recent version.

我不确定这是什么意思:我需要更新程序不需要停止。

I'm not certain what this means: "I need to update of the program does not needing stop".

如果要更新ClickOnce应用程序而不强制用户关闭您可以使用编程API来检查更新并进行安装,但是必须重新启动应用程序才能安装更新。 (Application.Restart())。

If you want to update a ClickOnce application without forcing the user to close it, you can use the programming APIs to check for an update and install it, but you will have to restart the application in order to install the updates. (Application.Restart()).

这篇关于申请更新的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆