尽管关闭了更新选项,ClickOnce 仍自动更新
[编辑]
解决方案似乎将 PersistUpdateCheckInfo 分配给 false:
UpdateCheckInfo updateInfo = null;
...
updateInfo = deployment.CheckForDetailedUpdate(false);
[/编辑]
我有一个(或多或少)完美的手动系统,用于使用 ClickOnce API 进行更新。我说完美是因为用户会看到一个表格,解释更新的内容以及为什么他们应该安装它。我讨厌自动 ClickOnce 系统。用户不知道程序会发生什么变化!
无论如何,尽管有:
1)发布|更新:“应用程序应该检查更新”关闭(尽管我确实有一个更新位置,我相信这是手动更新所必需的)。
2) 在发布向导中“应用程序不会检查更新”打开
它仍然会自动更新。我也尝试过将“自动更新”设置为“每 50 周”,但每次看起来仍然如此。
如果您能在这方面提供帮助,我们将不胜感激。谢谢!
[EDIT]
The solution seems to be assigning PersistUpdateCheckInfo to false:
UpdateCheckInfo updateInfo = null;
...
updateInfo = deployment.CheckForDetailedUpdate(false);
[/EDIT]
I've got a (more or less) perfect manual system for updates using the ClickOnce API. I say perfect because the user is presented with a form explaining what the update is all about and why they should install it. I HATE the automatic ClickOnce system. The user has no idea what's going to change in the program!
Anyway, despite having:
1) Publish | Updates: "The application should check for updates" OFF (though I do have an Update Location which I believe is required for manual updates).
2) In the Publish Wizard "The application will not check for updates" ON
It still updates automatically. I've also tried setting Automatic Updates to on, but "Every 50 weeks" but it still does it every time it seems.
If you can help out on this one, it's be mighty appreciated. Thx!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您仍然厌倦了 ClickOnce,这里有一个我编写的开源解决方案,旨在满足我们对 WinForms 和 WPF 应用程序的特定需求。总的想法是以尽可能最低的开销获得最大的灵活性。
因此,集成非常简单,并且该库几乎可以为您完成所有操作,包括同步操作。它还高度灵活,让您确定执行哪些任务以及在什么条件下执行 - 您制定规则(或使用一些已有的规则)。最后同样重要的是支持任何更新源(网络、BitTorrent 等)和任何提要格式 - 无论未实现的内容,您都可以自己编写。
还支持冷更新(需要重新启动应用程序),并且会自动完成,除非为任务指定“热插拔”。
这归结为一个 DLL,大小不到 70kb。
更多详细信息请访问 http:// www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/
代码位于 http://github.com/synhershko/NAppUpdate (根据 Apache 2.0 许可证获得许可)
我计划在有更多时间时对其进行更多扩展,但说实话,您应该能够自行快速增强它以应对当前不支持的任何内容。
In case you are still tired of ClickOnce, here's an open-source solution I wrote to address specific needs we had for WinForms and WPF apps. The general idea is to have the greatest flexibility, at the lowest overhead possible.
So, integration is super-easy, and the library does pretty much everything for you, including synchronizing operations. It is also highly flexible, and lets you determine what tasks to execute and on what conditions - you make the rules (or use some that are there already). Last by not least is the support for any updates source (web, BitTorrent, etc) and any feed format - whatever is not implemented you can just write for yourself.
Cold updates (requiring an application restart) is also supported, and done automatically unless "hot-swap" is specified for the task.
This boild down to one DLL, less than 70kb in size.
More details at http://www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/
Code is at http://github.com/synhershko/NAppUpdate (Licensed under the Apache 2.0 license)
I plan on extending it more when I'll get some more time, but honestly you should be able to quickly enhance it yourself for whatever it currently doesn't support.