How to Use AutoUpdater.NET to Keep Your Windows App Up-to-Date
What it is
AutoUpdater.NET is a lightweight open-source library for .NET applications that checks a remote XML (or JSON) feed for updates and can download and run an installer or patch to update the application.
Quick setup (presumptions: WinForms/WPF, .NET Framework/.NET Core)
- Add the NuGet package:
- Install-Package AutoUpdater.NET
-
Create an update feed (XML or JSON) hosted on a web server or CDN. Minimal XML example:
xml
-
1.2.0.0 https://example.com/downloads/MyAppSetup_1.2.0.0.exe false https://example.com/changelog/1.2.0.0.html Bug fixes and small improvements
- Call AutoUpdater from your app (e.g., on startup):
Options: set AutoUpdater.ReportErrors, AutoUpdater.ShowRemindLaterButton, AutoUpdater.DownloadPath, and event handlers (CheckForUpdateEvent, OnApplicationExit, etc.) for customization.
Common usage patterns
- Silent background check: run AutoUpdater.Start with ShowDialog=false (or handle events) and only prompt when update found.
- Mandatory updates: include true in feed so users must update.
- Patch vs full installer: point URL to incremental installer/patch if available.
- Custom UI/flow: handle AutoUpdater.CheckForUpdateEvent to implement your own download/install UI and logic.
Security & hosting
- Use HTTPS for the update feed and downloads.
- Sign installers to prevent tampering.
- Optionally verify file hashes in the app after download.
Troubleshooting tips
- Ensure version strings follow comparable format (major.minor.build.revision).
- Check CORS and server MIME types if updates fail to download.
- Enable AutoUpdater.ReportErrors to get exceptions during checks.
- Test feed URL in a browser to confirm it returns valid XML/JSON.
Resources
- Use the AutoUpdater.NET GitHub README and NuGet package docs for full API and examples.
If you want, I can produce a ready-to-host update XML/JSON file and sample code tailored to your app (name, current version, installer URL).
Leave a Reply