silverlight - 浏览器外 (oob) 应用程序的自定义安装程序。更新不起作用

标签 silverlight silverlight-5.0 silverlight-oob

我想为 Windows 和 MacOS 的 oob 应用程序创建自定义安装程序。

对于 Windows,我使用了以下方法 - https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set

对于 MacOS,以下解决方案 - https://www.blaize.net/2012/04/offline-oob-mac-installation/

这些方法运行良好并创建应用程序,但应用程序更新不适用于它们。

在Silverlight应用程序中,我使用以下代码进行更新:

private void CheckUpdateApplication()
{
    if (Application.Current.IsRunningOutOfBrowser)
    {
        Application.Current.CheckAndDownloadUpdateAsync();
        Application.Current.CheckAndDownloadUpdateCompleted += Application_CheckAndDownloadUpdateCompleted;
    }
}

private void Application_CheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e)
{
    if (e.UpdateAvailable)
    {
        MessageBox.Show(CommonMethod.MessageUpdateApplication);
    }
    else if (e.Error != null)
    {
        MessageBox.Show(string.Format("{0} - {1}", e.Error.GetType().Name, e.Error.Message));
    }
}

在浏览器外应用程序的设置中,我设置了复选框 - “在浏览器外运行时需要提升信任”。 XAP 文件使用自签名证书进行签名。

在 Windows 中安装后,更新时出现以下错误:

Exception - Error HRESULT E_FAIL has been returned from a call to a COM component.

在 MacOS 中安装后,我得到以下信息:

OutOfMemoryException - Error 0x1AA6.

最佳答案

/origin 命令行参数传递给 sllauncher.exe

来自https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set :

This option specifies the Uri where the XAP file have come from. This Uri is used for security purposes and auto-updates. For example: /origin: http://mywebsite.com/SampleOOB.xap

关于silverlight - 浏览器外 (oob) 应用程序的自定义安装程序。更新不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53228349/

相关文章:

macos - OOB Silverlight 应用程序究竟如何在 Mac 上运行?

c# - 如何在加载数据后显示我的 Silverlight 应用程序?

silverlight - 自定义 StackPanel Prism 区域适配器以支持排序

具有提升信任和签名证书的 Silverlight 4 OOB 应用程序不会更新?需要重新安装吗?

validation - TabControl 上的剩余验证工具提示

mvvm - DataGrid 上的动态转换器参数

c# - 具有本地数据选项的 Silverlight 4 OOB

c# - 列表框绑定(bind) - 由一个源延迟

silverlight - 设置 Silverlight 起始页

file - 在 Silverlight SaveFileDialog 中打开文件而不是保存文件