EndogenousUpdater 6.0.0.6

dotnet add package EndogenousUpdater --version 6.0.0.6
NuGet\Install-Package EndogenousUpdater -Version 6.0.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EndogenousUpdater" Version="6.0.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EndogenousUpdater --version 6.0.0.6
#r "nuget: EndogenousUpdater, 6.0.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EndogenousUpdater as a Cake Addin
#addin nuget:?package=EndogenousUpdater&version=6.0.0.6

// Install EndogenousUpdater as a Cake Tool
#tool nuget:?package=EndogenousUpdater&version=6.0.0.6

Introduction

Performs application updates using the application itself as the updater.

Nuget

Getting Started

To add EndogenousUpdater to your project, simply register it in your service collection:

services.AddEndogenousUpdater(services, u =>
{
    u.WithVersionBasedUpdates(v =>
    {
        v.Source.WithDirectoryVersion(updateDirectoryPath);
        v.Destination.WithAssemblyVersion(Assembly.GetEntryAssembly());
    });
    u.ZipDirectorySource(updateDirectoryPath); 
    u.CurrentDirectoryDestination();
    u.WithRelaunchOptions(o => o.InferLaunchOptions());
});

This will get you endogenous updater, using version based update checks with the provided update updateDirectoryPath. The client will compare its entry assembly version to the verison number of the most recent zip file in the format XXXX-1.2.3.4.zip.

Note, if you want to keep things simple, try this instead:

services.AddEndogenousUpdater(@"\\my\lan\update-source");

Then somewhere in your code, request an instance of IEndogenousUpdater and call ApplyUpdatesAsync.

public class MyUpdater
{
    private readonly IEndogenousUpdater updater;

    public MyMigrator(IEndogenousUpdater updater)
    {
        this.updater = updater;
    }

    public async Task ApplyUpdatesAsync(CancellationToken cancellationToken)
    {
        await updater.ApplyUpdatesAsync(cancellationToken);
    }
}

If you have logging enabled, you should see something like this in your logs:

info: EndogenousUpdater.Updater[0]
      Cleaning up any old files from previous instance.
info: EndogenousUpdater.Updaters.NewerVersionUpdateChecker[0]
      Checking client for version
info: EndogenousUpdater.Updaters.NewerVersionUpdateChecker[0]
      Found client version: 0.9.0.0
info: EndogenousUpdater.Updaters.NewerVersionUpdateChecker[0]
      Checking server for version
info: EndogenousUpdater.Updaters.NewerVersionUpdateChecker[0]
      Found server version: 1.0.0.0
info: EndogenousUpdater.Updater[0]
      Updates are available. Applying them now.
info: EndogenousUpdater.Updater[0]
      Downloading update file.
info: EndogenousUpdater.Updater[0]
      Moving existing files to old format so they can be cleaned up later.
info: EndogenousUpdater.Updater[0]
      Extracting update files to destination.
info: EndogenousUpdater.Updater[0]
      Restarting application
info: EndogenousUpdater.ApplicationLaunchers.ProcessApplicationLauncher[0]
      Launching new instance of application: Simple.exe

Why EndogenousUpdater

  • Simple as you want to make it. No 3rd party installers, no restrictions on how you package and deploy your application.
  • Full async/await support.
  • Fully customizable. Dependency Injection based means you can overwrite any aspect of the project.
  • Familiar code structure. Based on the Microsoft.Extensions.* projects. If you are already leveraging those packages in your project, this package will seem very familiar in it's setup.

Build and Test

Clone the code and press build in Visual Studio. Or use dotnet build/test to get started.

Contribute

Please create a pull request with details on what you are improving.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.0.0.6 341 11/16/2021
6.0.0.5 294 11/16/2021
6.0.0.4 338 9/13/2021
6.0.0.3 306 9/13/2021
6.0.0.2 297 9/13/2021
6.0.0.1 344 9/10/2021
6.0.0 355 9/10/2021