Using Squirrel.Windows , I wanted to handle the upgrade process in the Application Exit handler of my WPF application using this code:
Task.Run(async () => { using (var mgr = new UpdateManager(Settings.Default.UpdatePath)) { var release = await mgr.UpdateApp(); if (release != null && release.Version > Assembly.GetEntryAssembly().GetName().Version) { MessageBox.Show("Update applied"); } } });
This code works if I call it at startup or in an event handler at runtime, but not inside the application exit event handler, defined as follows:
App.xaml:
<Application ... Exit="Application_Exit" ...
App.xaml.cs:
void Application_Exit(object sender, ExitEventArgs e) { ... }
Is this a limitation of Squirrel.Windows? Or is there something special to use the code provided in the Exit Exit event handler?
c # wpf xaml squirrel.windows
Matthieu Aug 18 '15 at 14:21 2015-08-18 14:21
source share