gpt4 book ai didi

c# - ClickOnce 应用程序跳过请求更新(如果选择跳过,则启动失败)

转载 作者:IT王子 更新时间:2023-10-29 04:29:15 26 4
gpt4 key购买 nike

我更新了我的 ClickOnce 应用程序,然后在用户运行时询问他们是否要安装新版本。

我在高度受控的环境中工作。当更新可用时,必须安装它(旧版本不保证与数据库的向后兼容性)。

另一种选择是如果按下跳过则运行失败(也可以正常工作)。

我需要一些方法来阻止他们运行旧版本的应用程序。

最佳答案

本文回答了您的问题。我会将您指向这篇文章,而不是仅仅发布一个答案,因为文章中的所有内容都值得了解。

http://www.sayedhashimi.com/CategoryView,category,ClickOnce.aspx

以下为文章相关节选:

Forcing ClickOnce Updates

One of the big selling points of ClickOnce is automatic updates. One of the common questions I get with regard to updates is "How can I force an update on the user?"

There are three things to know with respect to forcing updates on users:

1) If your application is an online application, your users will always run the latest version; online applications get downloaded everytime the application is accessed. Thus, with online applications, you get forced-updates by default.

2) If your application is an installed application, you can force updates by using the MinimumRequiredVersion attribute. If you publish your application using Visual Studio, you can set this property from the Updates Dialog.

3) The last thing to note is that if your application is an installed application (and you have not set the MinimumRequiredVersion attribute) ClickOnce will prompt the user with an "Update Available" dialog ONLY if the user launches the application from the Start Menu shortcut. That is, if an application is an installed application and the user launches the application from a URL, ClickOnce forces the update.


我还发现了一篇不错的文章:

ClickOnce: Bringing Ease and Reliability to Smart Client Deployment

关于c# - ClickOnce 应用程序跳过请求更新(如果选择跳过,则启动失败),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1638066/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com