xueaaaa.VersionControl
1.0.1
See the version list below for details.
dotnet add package xueaaaa.VersionControl --version 1.0.1
NuGet\Install-Package xueaaaa.VersionControl -Version 1.0.1
<PackageReference Include="xueaaaa.VersionControl" Version="1.0.1" />
<PackageVersion Include="xueaaaa.VersionControl" Version="1.0.1" />
<PackageReference Include="xueaaaa.VersionControl" />
paket add xueaaaa.VersionControl --version 1.0.1
#r "nuget: xueaaaa.VersionControl, 1.0.1"
#:package xueaaaa.VersionControl@1.0.1
#addin nuget:?package=xueaaaa.VersionControl&version=1.0.1
#tool nuget:?package=xueaaaa.VersionControl&version=1.0.1
VersionControl is designed to monitor users' app versions, and update them if a new one is released on GitHub.
To begin with
Make sure you have published your app on GitHub, its repository is publicly accessible, and new versions of the app are released using GitHub Releases, with the mandatory version indication in the Release Tag.
Please note that VersionControl only works with 0.0.0.0 format versions. If you are using a different application versioning system, this package will not work for you!
The screenshot below shows how a properly designed release should look like for VersionControl to work correctly.

Install
You can install VersionControl directly into your project using NuGet.
dotnet add package xueaaaa.VersionControl
Usage
Before using the library, be sure to initialize the parameters required for operation.
using VersionControl;
Parameters.Set(repoName: "VersionControl",
repoOwner: "xueaaaa",
updateFileName: "upd.zip");
To get the version of the app installed on the user's device, use this:
using VersionControl.Models.Versions;
var local = Version.Local;
To get the latest version of the app on GitHub you just need to use static method Create(). You cannot get a non-latest version from GitHub.
using VersionControl.Models.Versions;
var gitVersion = await GitVersion.Create();
To install the latest version, use the VersionInstaller class, for example, as shown in the following code snippet. It is recommended to check if it is really required before installing.
using VersionControl.Models.Installers;
using VersionControl.Models.Versions;
var local = Version.Local;
var gitVersion = await GitVersion.Create();
var installer = new VersionInstaller(local, gitVersion);
if (installer.Check())
installer.Install();
// OR
if (gitVersion > local)
installer.Install();
VersionControl only downloads the file, it does not install/unpack it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Octokit (>= 9.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.