EndogenousUpdater 6.0.0.6

.NET 5.0 .NET Standard 2.0
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, C# scripting and .NET Interactive. 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 Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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 237 11/16/2021
6.0.0.5 207 11/16/2021
6.0.0.4 245 9/13/2021
6.0.0.3 228 9/13/2021
6.0.0.2 214 9/13/2021
6.0.0.1 259 9/10/2021
6.0.0 269 9/10/2021