Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eea0d92d85 | |||
| 655fefa822 | |||
| d2c54840ba | |||
| 870426ec08 |
@@ -214,25 +214,25 @@ namespace MarcusLaw.OutlookAddin.UI.ViewModels
|
||||
return;
|
||||
}
|
||||
|
||||
// VSTO add-ins cannot be updated programmatically from inside
|
||||
// a running Outlook — ApplicationDeployment.Update() throws.
|
||||
// Open the .vsto URL via the shell; Windows hands it to
|
||||
// VSTOInstaller.exe which installs the update correctly.
|
||||
try
|
||||
{
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(manifestUri.ToString())
|
||||
{
|
||||
UseShellExecute = true
|
||||
});
|
||||
UpdateStatusBrush = SuccessBrush;
|
||||
UpdateStatus = $"זמינה גרסה {availableVersion} — אשר את ההתקנה בחלון שנפתח, ואז סגור ופתח את Outlook.";
|
||||
}
|
||||
catch (Exception launchEx)
|
||||
{
|
||||
_logger.Warning(launchEx, "CheckForUpdate: shell launch of installer URL failed");
|
||||
UpdateStatusBrush = ErrorBrush;
|
||||
UpdateStatus = $"זמינה גרסה {availableVersion} אבל לא הצלחנו לפתוח את חלון ההתקנה. גש ידנית ל-{manifestUri}";
|
||||
}
|
||||
// A running Outlook holds file locks on the loaded add-in
|
||||
// DLLs. Neither ApplicationDeployment.Update (TrustNotGranted)
|
||||
// nor a direct VSTOInstaller.exe /I call (0x8007007E
|
||||
// ERROR_MOD_NOT_FOUND) nor Process.Start(.vsto URL) (Chrome
|
||||
// downloads to local-machine zone — InvalidDeploymentException)
|
||||
// can install over those locks. The only path that actually
|
||||
// works is the one VSTO runtime takes automatically on Outlook
|
||||
// startup: it checks the manifest URL before loading the
|
||||
// add-in, downloads + installs if there's a newer version,
|
||||
// then loads it.
|
||||
//
|
||||
// So the button's job is just to tell the user: "close and
|
||||
// reopen Outlook." That's the same flow the user has been
|
||||
// doing manually all along; we're just confirming the new
|
||||
// version is there waiting.
|
||||
UpdateStatusBrush = SuccessBrush;
|
||||
UpdateStatus =
|
||||
$"זמינה גרסה {availableVersion}. סגור ופתח את Outlook — " +
|
||||
"הגרסה החדשה תותקן אוטומטית בעלייה.";
|
||||
return;
|
||||
}
|
||||
catch (System.Deployment.Application.DeploymentDownloadException ex)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<PublishUrl>C:\Users\Chaim\source\repos\OutlookAddin\Publish\</PublishUrl>
|
||||
<InstallUrl>https://gitea.dev.marcus-law.co.il/espocrm-extensions/OutlookAddin/raw/branch/main/Publish/</InstallUrl>
|
||||
<TargetCulture>en</TargetCulture>
|
||||
<ApplicationVersion>1.2.4.0</ApplicationVersion>
|
||||
<ApplicationVersion>1.2.8.0</ApplicationVersion>
|
||||
<AutoIncrementApplicationRevision>false</AutoIncrementApplicationRevision>
|
||||
<UpdateEnabled>true</UpdateEnabled>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
|
||||
@@ -33,6 +33,6 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.2.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.4.0")]
|
||||
[assembly: AssemblyVersion("1.2.8.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.8.0")]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user