如何提供ClickOnce更新的描述? [英] How to provide description of update with ClickOnce?

查看:89
本文介绍了如何提供ClickOnce更新的描述?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经编写了一个应用程序,并且已经有很长一段时间了,我已经通过ClickOnce向其推送了更新。该应用程序位于我们的主文件服务器上。但是,每次我发布更新时,都会被问到我做了什么更改!有什么方法可以提供对用户友好的ClickOnce更新个性化描述?例如,当用户启动其应用程序时,ClickOnce会询问有可用的新版本。您想更新吗?,在下面可以对更新内容进行描述?还是用ClickOnce无法做到?

We have an app which I've coded up and for ages now I've pushed updates to it through ClickOnce. The app sits on our main file server. But every time I push out an update I get asked what I've changed! Is there any way to provide a personalised description of an update with ClickOnce which would be user-friendly? For example, when the user launches their application, ClickOnce asks "A new version is available. Would you like to update?", below which I could have a description of what I've updated? Or is this impossible with ClickOnce?

推荐答案

这是我的操作方法。我在发布模式下的启动代码中调用此方法:

Here's how I do it. I call this method in my startup code, in Release mode:

using System.Deployment.Application;
...

private void DisplayChangeLog()
{
    if (!ApplicationDeployment.IsNetworkDeployed)
        return;

    if (!ApplicationDeployment.CurrentDeployment.IsFirstRun)
        return;

    ThreadPool.QueueUserWorkItem(state =>
        Execute.OnUIThread(() => <Pop up window with latest changes> ));
}

我知道这不是精确地希望,因为它显示了用户第一次运行该应用程序,但之后,他们已经安装了更新。在我们的环境中,用户无法选择是否更新,因此这并没有真正的区别。

I know this isn't precisely what you want, as it displays the first time the user runs the app but after they've already installed the update. In our environment users don't have a choice whether they update or not, so it makes no real difference.

这篇关于如何提供ClickOnce更新的描述?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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