I want to create a custom installer for oob applications for Windows and MacOS.
For Windows, I used the following method - https://www.codeproject.com/Articles/179756/Installing-Silverlight-OOB-Application-using-a-Set
For MacOS, the following solution - https://www.blaize.net/2012/04/offline-oob-mac-installation/
These methods work well and create the application, but the application update does not work with them.
In the Silverlight application, I use the following code to update:
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));
}
}
In the settings of out of browser application, I set the checkbox - "Require elevated trust when running outside the browser". The XAP file is signed with a self-signed certificate.
After installing in Windows, I get the following error when updating:
Exception - Error HRESULT E_FAIL has been returned from a call to a COM component.
After installing in MacOS, I get the following:
OutOfMemoryException - Error 0x1AA6.