kjs.applife.update.controller
6.0.6
Prefix Reserved
dotnet add package kjs.applife.update.controller --version 6.0.6
NuGet\Install-Package kjs.applife.update.controller -Version 6.0.6
<PackageReference Include="kjs.applife.update.controller" Version="6.0.6" />
<PackageVersion Include="kjs.applife.update.controller" Version="6.0.6" />
<PackageReference Include="kjs.applife.update.controller" />
paket add kjs.applife.update.controller --version 6.0.6
#r "nuget: kjs.applife.update.controller, 6.0.6"
#:package kjs.applife.update.controller@6.0.6
#addin nuget:?package=kjs.applife.update.controller&version=6.0.6
#tool nuget:?package=kjs.applife.update.controller&version=6.0.6
Kjs.AppLife.Update.Controller
Kjs.AppLife.Update.Controller is a Windows Forms-compatible .NET Framework
client library for applications that use AppLife Builder
to publish software updates.
The controller can check for updates, download and validate update packages, and start the AppLife update process. It also provides built-in dialogs and events for applications that need either a complete interactive experience or control over each stage of the update workflow.
Compatibility
- .NET Framework 4.6.2 or later
- Windows desktop applications
- The package contains the controller assembly, design-time support assembly, and localized resources
Applications targeting an earlier .NET Framework version should continue using
Kjs.AppLife.Update.Controller version 6.0.0.96.
Installation
Install the package from NuGet:
Install-Package Kjs.AppLife.Update.Controller
Or add the package reference using the .NET CLI:
dotnet add package Kjs.AppLife.Update.Controller
Quick start
Configure the controller with the update location, application identifier, and
public key used to validate update packages. Then call UpdateInteractive to
run the built-in check, download, and apply workflow.
using System;
using System.Windows.Forms;
using Kjs.AppLife.Update.Controller;
public partial class MainForm : Form
{
private readonly UpdateController updateController = new UpdateController
{
UpdateLocation = "https://updates.example.com/my-app",
ApplicationId = new Guid("01234567-89AB-CDEF-0123-456789ABCDEF"),
PublicKeyToken = "<RSAKeyValue>...</RSAKeyValue>"
};
private void updateButton_Click(object sender, EventArgs e)
{
updateController.UpdateInteractive(this);
}
}
UpdateLocation, ApplicationId, and PublicKeyToken identify and secure the
update source. Replace the example values with the values generated for your
AppLife update project.
Staged update workflow
Use the staged API when the application needs to customize the update process:
- Call
CheckForUpdateorCheckForUpdateAsync. - Inspect
CurrentUpdate,AvailableUpdates, orAllUpdates. - Call
DownloadUpdateorDownloadUpdateAsync. - Call
ValidateUpdate. - Call
ApplyUpdate.
The controller also exposes ShowCheckForUpdateDialog and
ShowDownloadUpdateDialog when you want to keep the built-in dialogs but
control the workflow boundaries.
if (updateController.CheckForUpdate() &&
updateController.CurrentUpdate != null)
{
updateController.DownloadUpdate();
if (updateController.ValidateUpdate())
{
updateController.ApplyUpdate();
}
}
Checking, downloading, and applying an update can cause the application to
close or restart. Do not assume that code after UpdateInteractive or
ApplyUpdate will execute in every update outcome.
Events and asynchronous operations
Use the asynchronous methods for responsive UI applications:
CheckForUpdateAsyncwithCheckForUpdateCompletedDownloadUpdateAsyncwithDownloadUpdateCompletedDownloadUpdateProgressChangedfor download progressUpdateFoundto filter or respond to discovered updatesUpdateStartingto perform work before the application shuts downUpdateDialogShowingto customize dialog behaviorShutdownRequestedto participate in coordinated application shutdown
When handling CheckForUpdateCompleted, inspect Error, Cancelled, and
Result before using the result. Call CancelAsync to request cancellation of
an asynchronous operation.
Applying updates
ApplyUpdateOptions controls how an update is started:
NoRestartprevents an automatic application restart.NoUpdateWindowsuppresses the update window for supported action-list updates.NoShutdownkeeps the initiating application instance running.AutoClosecloses the update window when the operation completes.WaitForCompletionwaits for the update process and must be used withNoShutdown.KeepUpdateFilepreserves the downloaded update package.
For example:
updateController.ApplyUpdate(
ApplyUpdateOptions.NoRestart |
ApplyUpdateOptions.KeepUpdateFile);
Common configuration
The controller includes additional settings for common deployment scenarios:
UseHostAssemblyVersioncan derive the application version from the host assembly.Versionexplicitly controls the version used when checking for updates.AutoDetectProxy,ProxyAddress, and related proxy properties configure network access.PreferredDownloadPathcontrols where update files are downloaded.EnableOfflineUpdatesenables offline update behavior.EnableAutoChainingsupports chained updates.ControlledRolloutEnabledandControlledRolloutHourssupport controlled rollout scenarios.ErrorDisplayLevelcontrols the detail shown by built-in dialogs.- The controller supports FIPS when used with KJS Update Engine 6.0 or later.
Security and update validation
Set PublicKeyToken to the public RSA key that corresponds to the signing key
used by your AppLife update packages. Keep the private signing key out of the
application and source repository. Call ValidateUpdate before applying an
update when using the staged workflow.
Update history
Use UpdateController.GetUpdateHistory(applicationId) to retrieve update
history for an application, and ReadLastUpdateInformation() to read the most
recent update information.
License and support
This package is provided by Kinetic Jump Software, LLC. The license terms are
included in EULA.txt at the package root. See the project website for product
information and support:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on kjs.applife.update.controller:
| Package | Downloads |
|---|---|
|
kjs.applife.update.wpf
AppLife Update WPF controls and design-time components for .NET Framework desktop applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
This release targets .NET Framework 4.6.2 and later. Applications targeting .NET Framework versions earlier than 4.6.2 should continue using version 6.0.0.96.