UpdaterLibrary 2024.11.30.1338

There is a newer version of this package available.
See the version list below for details.
dotnet add package UpdaterLibrary --version 2024.11.30.1338                
NuGet\Install-Package UpdaterLibrary -Version 2024.11.30.1338                
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="UpdaterLibrary" Version="2024.11.30.1338" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UpdaterLibrary --version 2024.11.30.1338                
#r "nuget: UpdaterLibrary, 2024.11.30.1338"                
#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 UpdaterLibrary as a Cake Addin
#addin nuget:?package=UpdaterLibrary&version=2024.11.30.1338

// Install UpdaterLibrary as a Cake Tool
#tool nuget:?package=UpdaterLibrary&version=2024.11.30.1338                

UpdaterLibrary

This library Develop with c#. You can use to update for Winform or Service windows.

How it work?

=> Library will download you info verion 
=> Check version 
=> Download your file .zip 
=> Extract file .zip
=> Call you function to close your app
=> Replace all file extracted in your app folder
=> Run your commands after success
=> Open you application

How to use

1. Zip application and upload to your host

ex link to download: http://youlink.com/setup.zip

ex file app.xml link to download file app.xml: http://youlink.com/version.xml

<?xml version="1.0" encoding="utf-16"?>
<LastestVersionInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Version>1.0.0.1</Version>
  <LinkDownloadZipFile>http://youlink.com/setup.zip</LinkDownloadZipFile>
</LastestVersionInfo>

3. Check for update on you program

using System;
using System.IO;
using System.Reflection;
using UpdaterLibrary;

namespace Setup
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var urlDownloadFileXml = "http://youlink.com/version.xml";
            var runProgramFile = Path.Combine(Directory.GetCurrentDirectory(), "YouApp.exe");

            var param = UpdateParameter.CreateForCheckUpdate(
                urlGetInfoUpdate: urlDownloadFileXml,
                currentVersion: Assembly.GetExecutingAssembly().GetName().Version.ToString(),
                runProgramFile: runProgramFile,
                exitApplication: () => Environment.Exit(0),
                onLog: Console.WriteLine,
                folderApplication: Directory.GetCurrentDirectory(),
                executeCmdWhenCopySuccessfuls: default,
                folderExtractedZip: default,
                pathFileZip: default
            );

            var lastestVersion = new UpdateExecuter().GetLatestVerionAsync(param).Result;
            var hasNewVersion = new UpdateExecuter().CheckForUpdateAsync(param, lastestVersion).Result;
            if (hasNewVersion)
            {
                var messageError = new UpdateExecuter().RunUpdateAsync(param).Result;
                Console.WriteLine(messageError);
            }
            else
            {
                Console.WriteLine("You are lastest version.");
            }
            Console.ReadKey();
        }
    }
}

Thanks you. Contact me: tiephoang.dev@gmail.com

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  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.

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
2024.11.30.2321 98 11/30/2024
2024.11.30.2155 74 11/30/2024
2024.11.30.1402 80 11/30/2024
2024.11.30.1338 75 11/30/2024
2024.11.29.2357 71 11/29/2024
2024.11.29.2347 72 11/29/2024
1.0.0 83 11/29/2024