A user-friendly Update Notifier and Downloader (C#, WPF)

For quite some time, my update notification mechanism for most of my projects consisted of a Web Client async request to download a version file, check it against the current version, and show a message that would lead the user to a download page. This is all simple and great, but if you’re like me and you release updates constantly, you’d be better off using a delta updater, that knows which files have been updated since the last release, downloads them and installs them. For NBA Stats Tracker, I’ve taken the middle road. I release new versions quite frequently, so getting the user to the download page, then using the download link, then going through all the steps of installing it could be a hassle, deterring them from downloading and thus using the latest version. I thought I’d make the update process just a few clicks and minimize the time it requires to update to a few seconds.

Here’s how it works.

Continue reading

How to get detailed error reports on unhandled (and forced) exceptions in WPF (Updated)

UPDATE: The post has been updated since first being published with some improvements to the code.
UPDATE #2 (May 15, 2013): The post has been updated again with much cleaner code and additional functionality.

To err is human. And so, many (well, hopefully, not that many) times your programs may crash. And most of the time, they won’t crash inside your development environment, hooked to a debugger that will give you all the information you need on why and where the error happened. They’ll crash on your client’s machine. So, what can you do if you’re developing a WPF application, and want your program to produce nice, detailed error reports that the users can send to you?

It’s quite easy, actually.

Continue reading