NetSparkle
NetSparkle is a C#, cross-platform, highly-configurable software update framework with pre-built UI for .NET developers compatible with .NET 4.6.2/.NET 6+, WinForms, WPF, and Avalonia; uses Ed25519 signatures. View basic usage here in the README and try the samples for yourself.
Install / Use
/learn @NetSparkleUpdater/NetSparkleREADME
NetSparkle is a highly-configurable software update framework for C# that is compatible with .NET 6+ and .NET Framework 4.6.2+, has pre-built UIs for .NET Framework (WinForms, WPF) and .NET 6+ (WinForms, WPF, Avalonia), uses Ed25519 or other cryptographic signatures, and even allows for custom UIs or no built-in UI at all! You provide, somewhere on the internet, an app cast with update and version information, along with release notes in Markdown or HTML format. This library then helps you check for an update, show the user the release notes, and offer to download/install the new version of the software.
Built-in supported update download types:
- Windows -- .exe, .msi, .msp
- macOS -- .tar, .tar.gz, .zip, .pkg, .dmg
- Linux -- .tar.gz, .deb, .rpm
Please see UPGRADING.md for information on major version changes, updates, etc.
Getting Started
- Installing NetSparkle
- How Updates Work
- Basic Usage
- Quick Start
- Project file setup
- App Cast
- App cast generator examples
- FAQ
- Requirements
- License
- Contributing
- Acknowledgements
- Other Options
Installing NetSparkle
NetSparkle is available via NuGet. To choose a NuGet package to use:
- Reference the core
NetSparkleUpdater.SparkleUpdater packageif you don't care about having a built-in UI and can manage things yourself - Choose one of the other packages if you want a built-in UI or want to create your UI based on one of the other UIs
| Package | Use Case | Release | Preview | Downloads |
| ------- | -------- | ------- | ------- | --------- |
| NetSparkleUpdater.SparkleUpdater | Core package; Use a 100% custom UI or no UI (nothing built-in) | |
|
|
| WinForms UI (.NET Framework) | NetSparkle with built-in WinForms UI |
|
|
|
| WinForms UI (.NET 6+) | NetSparkle with built-in WinForms UI |
|
|
|
| WPF UI (.NET Framework and .NET 6+) | NetSparkle with built-in WPF UI |
|
|
|
| Avalonia UI | NetSparkle with built-in Avalonia UI |
|
|
|
| App Cast Generator Tool |
netsparkle-generate-appcast CLI tool (incl. Ed25519 helpers) | |
|
|
| DSA Helper Tool |
netsparkle-dsa CLI tool (DSA helpers) | |
|
|
Quick info for tool installations:
- App cast generator --
dotnet tool install --global NetSparkleUpdater.Tools.AppCastGenerator; available asnetsparkle-generate-appcaston your command line after installation - DSA Helper --
dotnet tool install --global NetSparkleUpdater.Tools.DSAHelper; available asnetsparkle-dsaon your command line after installation
How updates work
A typical software update path for a stereotypical piece of software might look like this:
- Compile application so it can be run on other computers (e.g.
dotnet publish) - Programmer puts app in some sort of installer/zip/etc. for distribution (e.g. InnoSetup for Windows)
- Programmer creates app cast file (see the app cast section of this document for more info on how to create this)
- Programmer uploads files for distribution (installer, app cast file, appCast-file.signature file) to their download site.
- Client opens app and is automatically notified of an available update (or the software otherwise detects there is an update)
- Client chooses to update (or update is downloaded if the software downloads it automatically)
- Update is downloaded and sitting on the user's disk
- User is asked to close the software so the update can run. User closes the software.
- Downloaded file/installer is run (or the update is otherwise performed)
Right now, NetSparkleUpdater does not help you with 1., 2., or 4. "Why not?", you might ask:
-
- We can't compile your application for you since we don't know (or care) how you are compiling or packaging your application! :)
-
- A cross-platform installer package/system would be difficult and may not feel normal to end users, although a system that uses Avalonia could maybe work I suppose (might take a lot of work though and make downloads large!). We do not provide support for getting your installer/distribution ready. To generate your installer/distribution, we recommend the following:
- Windows: InnoSetup or NSIS or WiX
- macOS: If you have a .app to distribute, use dotnet-bundle with create-dmg. If you want an installer, create a .pkg installer with macos-installer-builder (tutorial here), Packages, or your terminal. Otherwise, plop things in a zip file. If you need to run with
sudofor whatever reason, there is an example of doing that in the macOSAvaloniasample. - Linux: Use dotnet-packaging to create an rpm, deb, or tar.gz file for your users.
-
- We don't know where your files will live on the internet, so you need to be responsible for uplo
