vb.net - 如何强制客户端在启动时使用 VB.NET 项目更新应用程序?

标签 vb.net visual-studio-2008 clickonce

我们有一个使用 Visual Studio 2008 用 VB.NET 编写的项目,将安装在 17 台客户端计算机上。

我们在启动项目的过程中遇到了一个问题。

我们已经从 Visual Studio 中创建了一个安装程序,并在客户端计算机上运行了 setup.exe。一切正常,但如果与此同时我们发布另一个更新,则在启动时用户会收到一条通知,说明该项目的新版本可用。

这是图片的链接,因为我没有足够的信誉来上传图片: http://postimage.org/image/7l7w6u841/

问题是弹出的消息框有一个“确定”和“取消”按钮,如果用户不小心单击“取消”,他们的程序将不会更新,这意味着他们将运行一个旧版本,可以导致问题。

我的问题是:有没有办法强制用户在启动时更新项目,就像“要么更新要么不能登录”之类的事情?

感谢您的宝贵时间,我们将不胜感激

填写

最佳答案

如果您使用的是 ClickOnce,这可以通过指定最低要求的版本来完成

There may be occasions when you want to require users to run an updated version of your application. For example, you might make a change to an external resource such as a Web service that would prevent the earlier version of your application from working correctly. In this case, you would want to mark your update as required and prevent users from running the earlier version. To mark an update as required, click Specify a minimum required version for this application in the Application Updates dialog box, and then specify the publish version (Major, Minor, Build, Revision), which specifies the lowest version number of the application that can be installed. For more information, see Application Updates Dialog Box.

http://msdn.microsoft.com/en-us/library/s22azw1e(v=vs.100).aspx (向下滚动到需要更新)

关于vb.net - 如何强制客户端在启动时使用 VB.NET 项目更新应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11340855/

相关文章:

javascript - 谷歌地图距离服务器端

.net - 使用 VB.Net 获取实现特定接口(interface)的所有类类型

asp.net - 为 CAC 卡配置 'Cassini'(ASP.NET 开发服务器)以进行测试 - 如何?

c# - 将 Web 服务引用移动到其他文件夹

c# - 发布了一个 ClickOnce 应用程序,它不断重置其设置

c# - 空字符串的怪异情况

vb.net - 在 Windows Phone (VB.NET) 中设置 HTTPS 连接

c# - 优化 Visual Studio 解决方案构建 - 将 DLL 文件放在哪里?

.net - 是否可以自动化 ClickOnce 部署?

visual-studio-2010 - 单击一次发布 VS 2012 停止的其他文件