I call the following Method in my UpdateCheckManager class after a usercontrol load event:
public static class UpdateCheckManager
{
#region Public Methods
public static async Task CheckForUpdates(IProgress<string> progressReport)
{
//wait for 2 sekonds, so GUI shows up and works.
await Task.Delay(2000);
using (var mgr = UpdateManager.GitHubUpdateManager(GenDefString.RepositoryLink))
{
progressReport.Report(GenDefString.CheckingForUpdates);
try
{
var updateinfo = await mgr.Result.CheckForUpdate();
Console.WriteLine("done");
....
}
catch(Exception e)
{
System.Windows.MessageBox.Show(e.Message);
}
}
}
#endregion
}
My application completely freezes as soon as it reaches the line
var updateinfo = await mgr.Result.CheckForUpdate();
I do not get any kind of exception thrown. The App just becomes unresponsive and I have to kill it externally. (However not showing the "not responding" message in the title bar)
The link saved in GenDefString.RepositoryLink is the following:
public const string RepositoryLink = @"https://github.com/myuser/myapp";
(with "myuser" and "myapp" replaced by my actual username and repository name of course)
I know that the CheckForUpdated() won't work while debugging in VS, however shouldn't it instead of completely crashing give me some feedback what went wrong, that I can implement?
My plan was to implement a few different results from this method, which the user gets from the progressReport:
- "Checking for updates..."
- "Checking for updates failed!"
- "Found and installed new update. A restart of the application is needed to apply updated. "
- "Currently running the latest version. "
I'm a bit lost on how to debug this error...
I call the following Method in my
UpdateCheckManagerclass after a usercontrol load event:My application completely freezes as soon as it reaches the line
var updateinfo = await mgr.Result.CheckForUpdate();I do not get any kind of exception thrown. The App just becomes unresponsive and I have to kill it externally. (However not showing the "not responding" message in the title bar)
The link saved in GenDefString.RepositoryLink is the following:
public const string RepositoryLink = @"https://github.com/myuser/myapp";(with "myuser" and "myapp" replaced by my actual username and repository name of course)
I know that the CheckForUpdated() won't work while debugging in VS, however shouldn't it instead of completely crashing give me some feedback what went wrong, that I can implement?
My plan was to implement a few different results from this method, which the user gets from the progressReport:
I'm a bit lost on how to debug this error...