Auto_updater.auto-update-desktop 1.0.0

dotnet add package Auto_updater.auto-update-desktop --version 1.0.0
                    
NuGet\Install-Package Auto_updater.auto-update-desktop -Version 1.0.0
                    
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="Auto_updater.auto-update-desktop" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Auto_updater.auto-update-desktop" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Auto_updater.auto-update-desktop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Auto_updater.auto-update-desktop --version 1.0.0
                    
#r "nuget: Auto_updater.auto-update-desktop, 1.0.0"
                    
#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.
#:package Auto_updater.auto-update-desktop@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Auto_updater.auto-update-desktop&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Auto_updater.auto-update-desktop&version=1.0.0
                    
Install as a Cake Tool

Auto Update Library

To use it create instance of the AutoUpdater class and pass instance of the ApplicationInfo to the constructor. ApplicationInfo class has following properties that must be provided during object creation:

  • ApplicationAssembly
  • ApplicationIcon
  • ApplicationId
  • ApplicationName
  • UpdateXmlLocation

ApplicationId must match with the appId provided in the update.xml described later in this text, while ApplicationName is used in the update UI to state which application is updated. UpdateXmlLocation is Uri object that contains url to the manifest file.

AutoUpdater class has two public methods, CheckForUpdate* and DoUpdate. Both do not take any parameters.

CheckForUpdate checks if there is update for the application at the provided url in the ApplicationInfo.

DoUpdate, that actually updates application by downloading files from the url specified in the update.xml in the url tag. It downloads files over HTTP so HTTP file server is needed as described in the following section.

Example usage:

AutoUpdater update = new AutoUpdater(new ApplicationInfo
{
    ApplicationAssembly = Assembly.GetExecutingAssembly(),
    ApplicationIcon = null,
    ApplicationId = "app",
    ApplicationName = "App",
    UpdateXmlLocation = new Uri("http://127.0.0.1:8080/manifest/app/update.xml")
});
if (update.CheckForUpdate())
    update.DoUpdate();

Update Server and Update manifest generator

Update server is currently used to generate update.xml file which is later used to compare application version and files. This file can be written manually as well just make sure that it has following structure.

<?xml version="1.0" encoding="UTF-8"?>
<AutoUpdate>
  <update appId="appID">
    <version value="1.2.3" />
    <url value="path to the app's update directory" />
    <exe value="name of the exe file to be launched after install" />
    <description value="about app" />
    <launchArgs value="launch arguments" />
    <directory name="root">
      <directory name="dir name">
        <directory name="dir name">
          <file name="file name" md5="ddc36f7deac22766a012bef7442dbf9a" />
          <file name="file name" md5="0f4db4016badbd2995f7a216f76173f4" />
          <file name="file name" md5="679bf008d7dcccdd8d4c72316ca9c189" />
        </directory>
        <directory name="dir name">
          <directory name="dir name" />
          <directory name="dir name" />
          <directory name="dir name" />
        </directory>
        <file name="file name" md5="d4879237ba9d9bb4859e33b0b1742cef" />
        <file name="file name" md5="e0c5adf8e536b6663a2bad267bf6dffc" />
      </directory>
    </directory>
  </update>
</AutoUpdate>

As HTTP file server HFS is used. Setup it and provide its URI to the AutoUpdate class through ApplicationInfo class.

Complete documentation can be found at: documentation. Download page: download.

Manifest generator tool download page: GitHub.

You are ready to go!

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.

Version Downloads Last Updated
1.0.0 1,968 12/2/2017