Howto Add a Check For Update button to a wpf application

KwebenaAcquah-9104 306 Reputation points
2021-01-24T04:51:32.88+00:00

I have a .NET 4.5 WPF app that gets installed using an MSI, generated via a visual studio setup project. Everything works great, except that I'm missing the Click Once Deployment feature that checks for new versions of the app on load and downloads/installs them. I switched away from Click Once Deployment because it seems to be a half-baked solution that makes you do hacks just to do simple things like have your app run on startup.

I was wondering if there is any sort of tutorial or code anyone can show me that lays out how to handle checking for new versions of the app, downloading the new version of the app, and installing the new app over the old one. This seems like something that most WPF apps would want to have, I'm surprised that I can't find anything about this on google.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,648 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,851 Reputation points
    2021-01-24T10:54:52.7+00:00

    If you dont like ClickOnce I think you have 2 options. Package app up it up and deploy it to the windows store so the store can handle updates for you.

    https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/modernize-wpf-tutorial-5

    Other option is to make sure the app has a version number. Create a web service your app calls to get latest version number. If your app is not using the newest version notify the user there is an update available

    0 comments No comments