TomLabs.AutoUpdate
0.3.2
dotnet add package TomLabs.AutoUpdate --version 0.3.2
NuGet\Install-Package TomLabs.AutoUpdate -Version 0.3.2
<PackageReference Include="TomLabs.AutoUpdate" Version="0.3.2" />
<PackageVersion Include="TomLabs.AutoUpdate" Version="0.3.2" />
<PackageReference Include="TomLabs.AutoUpdate" />
paket add TomLabs.AutoUpdate --version 0.3.2
#r "nuget: TomLabs.AutoUpdate, 0.3.2"
#:package TomLabs.AutoUpdate@0.3.2
#addin nuget:?package=TomLabs.AutoUpdate&version=0.3.2
#tool nuget:?package=TomLabs.AutoUpdate&version=0.3.2
TomLabs.AutoUpdate
Self-update for portable .NET desktop apps — no installer, no helper process.
- Sources: GitHub Releases (stable = latest release, nightly = rolling
nightlypre-release) or alatest.jsonmanifest on any HTTPS server. - Verification: every asset carries a SHA-256 in the manifest; unverified builds are refused.
- Apply: the running
App.exeis renamed toApp.exe.old, the new one copied in and started with--updated; the.oldfile is the rollback and is removed on the next healthy start. - Channels: a build with a
-nightly.<sha>version suffix follows the nightly channel, a release follows stable; the user can switch. - UI:
TomLabs.AutoUpdate.Avaloniaships anUpdateBanner("v1.2.0 available · Update") and a view model.
Use in an app
Both packages are on nuget.org:
<PackageReference Include="TomLabs.AutoUpdate.Avalonia" Version="0.3.2" />
<PackageReference Include="TomLabs.AutoUpdate" Version="0.3.2" />
// App.axaml.cs, OnFrameworkInitializationCompleted
Updater.Start(new UpdateOptions("IISBlitz", new GitHubReleasesSource("TomasBouda", "IISBlitz"))
{
Channel = settings.UpdateChannel, // null = follow the build
ChannelChanged = ch => { settings.UpdateChannel = ch; settings.Save(); },
Log = message => logger.Information(message),
ExitApplication = () => desktop.Shutdown(),
});
<StyleInclude Source="avares://TomLabs.AutoUpdate.Avalonia/Themes/Default.axaml"/>
<update:UpdateBanner/>
Override UpdateBannerBackground, UpdateBannerBorder, UpdateBannerForeground, UpdateBannerAccent,
UpdateBannerAccentSoft and UpdateBannerError in Application.Resources to match your palette.
Publish with the reusable workflow
jobs:
nightly:
uses: TomasBouda/TomLabs.AutoUpdate/.github/workflows/publish-app.yml@master
with:
project: src/App/App.csproj
app-name: App # must equal UpdateOptions.AppName
channel: nightly # or stable, from a tag workflow
The workflow publishes <App>-<rid>.zip per RID plus update.json:
{
"name": "App", "version": "0.5.0-nightly.78a63f7", "commit": "…", "channel": "nightly",
"publishedAt": "2026-09-15T16:48:00Z", "notesUrl": "https://github.com/…/releases/tag/nightly",
"assets": [ { "rid": "win-x64", "file": "App-win-x64.zip", "sha256": "…", "size": 20786796, "executable": "App.exe" } ]
}
The version must come from the build (<VersionPrefix> in the csproj; the workflow appends
-nightly.<sha> for the nightly channel) — the updater reads AssemblyInformationalVersion.
Signed manifests (optional, recommended)
Generate a key pair once (openssl ecparam -name prime256v1 -genkey -noout -out private.pem,
openssl ec -in private.pem -pubout -out public.pem), store the private key as the UPDATE_SIGNING_KEY
secret of each app repository and pass it to the workflow:
uses: TomasBouda/TomLabs.AutoUpdate/.github/workflows/publish-app.yml@master
with: { … }
secrets:
signing-key: ${{ secrets.UPDATE_SIGNING_KEY }}
Embed the public key in the app (PublicKeyPem = "-----BEGIN PUBLIC KEY-----…") and every manifest must then
carry a valid update.json.sig; a missing or tampered signature rejects the update.
Private feeds
UpdateOptions.AccessToken is sent as Authorization: Bearer … with every manifest and download
request. A private app on the TomLabs app store ("private": true in its appstore.json) answers 404
to anonymous requests, so its updater needs one of the store's download tokens here; on GitHub a
fine-grained token with contents: read reaches the releases of a private repository the same way.
Rollback
The previous executable stays as App.exe.old until the new build reports a healthy start — call
Updater.Current?.MarkHealthy() once the main window is up (or it is assumed after 60 s). If the new
build dies before that, the next launch restores the previous version automatically.
Requirements
- The app runs from a writable folder (portable exe). Program Files without elevation is refused with a clear reason; the banner then stays hidden.
- .NET 10, trimming-safe (System.Text.Json source generation); the banner needs Avalonia 11.3.18 or newer.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TomLabs.AutoUpdate:
| Package | Downloads |
|---|---|
|
TomLabs.AutoUpdate.Avalonia
Avalonia update banner and view model for TomLabs.AutoUpdate. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.2 | 190 | 9/24/2026 |