UpSparkle 1.1.1
dotnet add package UpSparkle --version 1.1.1
NuGet\Install-Package UpSparkle -Version 1.1.1
<PackageReference Include="UpSparkle" Version="1.1.1" />
<PackageVersion Include="UpSparkle" Version="1.1.1" />
<PackageReference Include="UpSparkle" />
paket add UpSparkle --version 1.1.1
#r "nuget: UpSparkle, 1.1.1"
#:package UpSparkle@1.1.1
#addin nuget:?package=UpSparkle&version=1.1.1
#tool nuget:?package=UpSparkle&version=1.1.1
![]()
UpSparkle
Thin .NET wrapper around WinSparkle (Windows) and Sparkle (macOS). One NuGet package, two platforms.
About
UpSparkle gives .NET desktop apps a cross-platform auto-update UI without any platform-specific plumbing code. It ships a single netstandard2.0 NuGet package that automatically picks the right native binary at runtime.
- Windows — wraps WinSparkle
- macOS / Mac Catalyst — wraps Sparkle
Quickstart
1. Install the NuGet package
dotnet add package UpSparkle
Or via Package Manager Console in Visual Studio:
Install-Package UpSparkle
2. Configure your project
Initialize reads your app's metadata from the executing assembly, so you need to set those values in your project first.
Windows — SDK-style project (.csproj)
Add company, product, and version to your <PropertyGroup>, then declare the UpSparkle-specific metadata in an <ItemGroup>:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Company>Wayne Enterprise</Company>
<Product>BatComputer App</Product>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<AssemblyMetadata Include="SUFeedURL" Value="https://example.com/appcast.xml" />
<AssemblyMetadata Include="SUPublicEDKey" Value="<your-base64-eddsa-public-key>" />
</ItemGroup>
</Project>
These map to AssemblyCompanyAttribute, AssemblyProductAttribute, AssemblyInformationalVersionAttribute, and AssemblyMetadataAttribute respectively — all of which Initialize reads at runtime.
Windows — classic .NET Framework project (AssemblyInfo.cs)
For non-SDK-style projects (e.g. .NET Framework 4.6.2 targeting net462 without <Project Sdk="...">), the <ItemGroup>/<AssemblyMetadata> shorthand is not available. Add the attributes directly to your Properties\AssemblyInfo.cs instead:
using System.Reflection;
// Standard assembly identity attributes
[assembly: AssemblyCompany("Wayne Enterprise")]
[assembly: AssemblyProduct("BatComputer App")]
[assembly: AssemblyInformationalVersion("1.0.0")]
// UpSparkle-specific metadata
[assembly: AssemblyMetadata("SUFeedURL", "https://example.com/appcast.xml")]
[assembly: AssemblyMetadata("SUPublicEDKey", "<your-base64-eddsa-public-key>")]
AssemblyMetadatais inSystem.Reflectionand is available in .NET Framework 4.5+.
macOS — Info.plist
On macOS, Sparkle reads its configuration directly from the app bundle's Info.plist. At minimum you need:
<key>SUFeedURL</key>
<string>https://example.com/appcast.xml</string>
<key>SUPublicEDKey</key>
<string><your-base64-eddsa-public-key></string>
Commonly used optional keys:
<key>SUEnableAutomaticChecks</key>
<true/>
<key>SUScheduledCheckInterval</key>
<integer>86400</integer>
<key>SUAutomaticallyUpdate</key>
<false/>
<key>SUShowReleaseNotes</key>
<true/>
For the full list of supported keys see the Sparkle customization docs.
To generate your EdDSA key pair, use the generate_keys tool that ships with Sparkle. See the EdDSA signatures guide for step-by-step instructions.
3. Initialize the updater
Create one UpSparkleUpdater instance per application (typically at startup) and call Initialize. The simplest form reads everything from the executing assembly:
using UpSparkle;
var updater = new UpSparkleUpdater();
// Reads SUFeedURL and SUPublicEDKey from AssemblyMetadata,
// and company/product/version from standard assembly attributes.
updater.Initialize(System.Reflection.Assembly.GetExecutingAssembly());
You can also pass the appcast URL and/or public key directly — they take precedence over the assembly metadata:
updater.Initialize(
assemblyInfo: System.Reflection.Assembly.GetExecutingAssembly(),
appcastUrl: "https://example.com/appcast.xml",
edDSAPublicKey: "<your-base64-eddsa-public-key>");
After a successful call, the following properties are available:
| Property | Description |
|---|---|
IsInitialized |
true once Initialize has succeeded |
AppcastUrl |
The resolved appcast feed URL |
EdDSAPublicKey |
The resolved EdDSA public key |
CompanyName |
Resolved from AssemblyCompanyAttribute |
AppName |
Resolved from AssemblyProductAttribute |
AppVersion |
Resolved from AssemblyInformationalVersionAttribute (build metadata suffix stripped) |
4. Check for updates
Call CheckUpdateWithUI() to open the native update dialog — wire this to a menu item, toolbar button, or call it automatically on startup:
updater.CheckUpdateWithUI();
CheckUpdateWithUIthrowsInvalidOperationExceptionif called beforeInitialize.
5. Clean up on exit
Dispose the updater when the application closes to release native resources:
updater.Dispose();
After disposal, IsInitialized is reset to false.
Full Examples
WPF
using System.Windows;
using UpSparkle;
public partial class MainWindow : Window
{
private readonly UpSparkleUpdater _updater = new UpSparkleUpdater();
private void Window_Loaded(object sender, RoutedEventArgs e)
{
_updater.Initialize(System.Reflection.Assembly.GetExecutingAssembly());
}
private void CheckForUpdates_Click(object sender, RoutedEventArgs e)
{
_updater.CheckUpdateWithUI();
}
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
_updater.Dispose();
}
}
WinForms
using System.Windows.Forms;
using UpSparkle;
public partial class Form1 : Form
{
private readonly UpSparkleUpdater _updater = new UpSparkleUpdater();
private void Form1_Load(object sender, EventArgs e)
{
_updater.Initialize(System.Reflection.Assembly.GetExecutingAssembly());
}
private void btnCheckUpdate_Click(object sender, EventArgs e)
{
_updater.CheckUpdateWithUI();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
_updater.Dispose();
}
}
Avalonia (MVVM)
using System.Reflection;
using UpSparkle;
public partial class MainWindowViewModel : ViewModelBase
{
private readonly UpSparkleUpdater _updater = new UpSparkleUpdater();
public void Init()
{
_updater.Initialize(Assembly.GetExecutingAssembly());
// Properties are populated after Initialize
Console.WriteLine(_updater.CompanyName);
Console.WriteLine(_updater.AppName);
Console.WriteLine(_updater.AppVersion);
}
public void CheckForUpdates()
{
_updater.CheckUpdateWithUI();
}
}
MAUI
using System.Reflection;
using UpSparkle;
public partial class MainPage : ContentPage
{
private readonly UpSparkleUpdater _updater = new UpSparkleUpdater();
public MainPage()
{
InitializeComponent();
this.Loaded += (_, _) =>
_updater.Initialize(Assembly.GetExecutingAssembly());
this.Disappearing += (_, _) =>
_updater.Dispose();
}
private void OnCheckUpdatesClicked(object sender, EventArgs e)
{
_updater.CheckUpdateWithUI();
}
}
API Reference
UpSparkleUpdater
public class UpSparkleUpdater : IDisposable
Constructor
new UpSparkleUpdater()
Creates a new updater instance and loads the platform's native backend. The updater is not started until Initialize is called.
Initialization
void Initialize(Assembly assemblyInfo, string appcastUrl = null, string edDSAPublicKey = null)
Task InitializeAsync(Assembly assemblyInfo, string appcastUrl = null, string edDSAPublicKey = null)
Starts the native Sparkle / WinSparkle framework. Reads the company name, app name, and version from AssemblyCompanyAttribute, AssemblyProductAttribute, and AssemblyInformationalVersionAttribute. Any build-metadata suffix (e.g. 1.0.0+abc123) is stripped from the version.
appcastUrl and edDSAPublicKey are resolved from the parameters first, then from AssemblyMetadata entries with keys "SUFeedURL" and "SUPublicEDKey".
Throws ArgumentNullException if assemblyInfo is null, and ArgumentException if a required value cannot be resolved.
InitializeAsync is a convenience wrapper that calls Initialize and returns a completed task.
macOS note: Sparkle reads configuration from the app bundle's
Info.plist. TheedDSAPublicKeyparameter is used on Windows only; on macOS, embedSUPublicEDKeyinInfo.plistinstead.
Update checks
void CheckUpdateWithUI()
Task CheckUpdateWithUIAsync()
void CheckUpdateWithoutUI()
CheckUpdateWithUI() opens the native update dialog. CheckUpdateWithoutUI() performs a check in the background without the progress window. Both throw InvalidOperationException if called before Initialize.
Manual background checks can interfere with the native scheduler. Prefer automatic checks unless you have a specific reason to trigger one.
HTTP headers
void SetHttpHeader(string name, string value)
void ClearHttpHeaders()
Adds or replaces a header sent with appcast requests, release-note downloads, and update downloads. ClearHttpHeaders() removes every header previously set. Calling SetHttpHeader again with the same name replaces its value.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
IsInitialized |
bool |
get | true after a successful Initialize call. |
AppcastUrl |
string |
get | Appcast URL resolved during initialization. |
EdDSAPublicKey |
string |
get | EdDSA public key resolved during initialization. |
CompanyName |
string |
get | Company name from the assembly. |
AppName |
string |
get | Product name from the assembly. |
AppVersion |
string |
get | Version from the assembly. |
IsAutomaticCheckForUpdates |
bool |
get/set | Whether the native updater checks for updates automatically. |
UpdateCheckInterval |
int |
get/set | Interval between automatic checks, in seconds. |
LastCheckTime |
DateTime? |
get | UTC time of the last check, or null if updates have never been checked. |
The string properties return null before Initialize is called. The update settings reflect the native defaults until changed.
Events
event EventHandler Error
Raised when the native updater encounters an error. The normal "no update found" outcome and user-cancelled installations are not reported. Subscribers are invoked on the main thread.
Dispose()
void Dispose()
Shuts down the native updater and releases native resources. Resets IsInitialized to false. On Windows this calls win_sparkle_cleanup(); on macOS it is a no-op because Sparkle manages its own lifetime.
Threading
The native macOS functions must be called on the main thread. Call Initialize, CheckUpdate*, the header methods, and the property setters from the UI thread. WinSparkle manages its own background thread once initialized.
Configuration keys
UpSparkle reads two AssemblyMetadata entries on Windows and the matching Info.plist keys on macOS:
| Key | Purpose |
|---|---|
SUFeedURL |
URL of the appcast XML feed. |
SUPublicEDKey |
Base64-encoded EdDSA public key used to verify update signatures. |
The remaining Sparkle options (SUEnableAutomaticChecks, SUScheduledCheckInterval, SUAutomaticallyUpdate, SUShowReleaseNotes, and others) are documented in the Sparkle customization guide.
Supported Platforms
| Platform | Minimum version |
|---|---|
| Windows (x86 / x64 / Arm64) | .NET Framework 4.6.2, or .NET 6+ |
| macOS (Apple Silicon / Intel) | .NET 6+ |
| Mac Catalyst (Apple Silicon / Intel) | .NET 6+ |
Tested project types:
Windows — WinForms, WPF, WinUI, Avalonia UI, MAUI (WinUI)
macOS — .NET macOS, MAUI (Mac Catalyst), Avalonia UI, Uno Platform
Cross-platform — Eto Forms (Gtk, macOS, WPF)
Appcast & Signing
UpSparkle requires an appcast XML feed hosted at a public URL. Every update package must be signed with an EdDSA key pair.
Generate your keys with the generate_keys tool that ships with Sparkle, then follow the EdDSA signatures guide to sign your releases.
Development
Before starting development, fetch the native dependencies by running the script for your platform.
macOS / Linux
./getlibs.sh
Windows (PowerShell)
.\Get-Libraries.ps1
Both scripts download and extract binaries based on .gitbinmodules into the libs directory. To use a different version of Sparkle or WinSparkle, edit .gitbinmodules and re-run the script.
Credits
- sparkle-project/Sparkle — macOS native framework
- vslavik/winsparkle — Windows native implementation
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
UpSparkle 1.1.1.0 - 2026-11-13
Added
- Automatic update settings: IsAutomaticCheckForUpdates, UpdateCheckInterval, and
LastCheckTime on UpSparkleUpdater.
- CheckUpdateWithoutUI(): triggers a background update check without the progress UI.
- SetHttpHeader / ClearHttpHeaders: attach custom HTTP headers to appcast checks,
release-note downloads, and update downloads.
- Error event, raised when the native updater reports a failure. The normal
"no update found" outcome and user-cancelled installations are not reported.
- Eto Forms demo covering the Gtk, macOS, and WPF backends.
- Daily GitHub Actions workflow that checks Sparkle, libMacSparkle, and WinSparkle
releases and opens a pull request when a newer version is available.
- NuGet package icon.
Changed
- Updated native dependencies: Sparkle 2.10.1, libMacSparkle 1.2.0, WinSparkle 0.9.4.
- Moved the demo projects from src/Demos/ to the top-level examples/ directory.
- Expanded the demo applications with automatic-check, interval, last-check,
HTTP-header, and background-check controls.
- Expanded the test suite from 30 to 36 tests.
- Updated the README API reference to document the complete public surface.
Fixed
- The Error event no longer fires for "no update found" or user-cancelled
installations.
- Native callbacks are safe under Mono AOT / IL2CPP via MonoPInvokeCallback.