Silverlight 4 脱离浏览器:无需安装即可检查更新?
我创建了一个 Silverlight 4 应用程序,该应用程序在浏览器中运行。如您所知,有一个功能可以检查应用程序的新版本是否可用并安装它。
但是,如果我只想检查更新并且不安装更新怎么办?
就我个人而言,我不喜欢默默地自我更新、从互联网下载某些内容的应用程序。所以我希望有以下机制。
- 当应用程序启动时,它会检查更新是否可用
- 如果是这样,我会向用户显示一个消息框,告诉她有更新,并且她可以通过更新按钮下载并安装它
- 用户现在可以决定更新
不幸的是,似乎没有选择只检查更新而不实际下载和安装它。有什么想法,如何实现这一目标?
预先感谢,
坦率
I have created a Silverlight 4 application, that is running out of browser. As you will know, there is a function that is checking if a new version of the app is available and installing it.
But what if I want to only check for the update and not installing it?
Personally, I do not like applications that silently update themselves, downloading something from the internet. So I'd like to have the following mechanism.
- when the app starts, it checks if updates are available
- if so, I show a messagebox to the user, telling her that there is an update and that she can download and installing it via the update-button
- the user can now decide to update
Unfortunately, there seems to be no option to just checking for updates without actually downloading and installing it. Any ideas, how to achieve this?
Thanks in advance,
Frank
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以自行进行更新检测,方法是在服务器上的应用程序的 XAP 旁边放置一个包含最新版本的小文件。例如:
当您想检查更新而不下载更新时,您可以随时点击 .ver 文件,检查其中列出的版本,如果比当前正在运行的应用程序更新,则显示
Update
按钮用户。请注意,此方法还允许您创建更高级的方案,例如提示用户升级到应用程序的不同版本(例如 Pro),或者他们需要升级 Silverlight 才能获取最新版本。
如果您有多个应用程序,您可以在该文件中列出所有应用程序,并在应用程序之间进行交叉推广。
You can roll your own update detection, by having a small file on your server next to the XAP for your app, that contains the latest version. For example:
When you want to check for updates without downloading them, you can always hit the .ver file, check the version listed in it and if newer then the current running app, show the
Update
button to the user.Note that this approach also would allow you to create more advanced scenarios, like prompting the user to upgrade to a different version of the app (Pro for example) or that they need to upgrade their Silverlight to get the latest.
And if you have multiple apps, you can list all of them in that file and do cross-promotion between your apps.