https://github.com/hehang0/autoupdatedotnet
AutoUpdate is a library for automatically updating .NET applications. It can check for new update packages, download them, and install them.
https://github.com/hehang0/autoupdatedotnet
auto-update csharp netcore netframework
Last synced: 13 days ago
JSON representation
AutoUpdate is a library for automatically updating .NET applications. It can check for new update packages, download them, and install them.
- Host: GitHub
- URL: https://github.com/hehang0/autoupdatedotnet
- Owner: HeHang0
- License: mit
- Created: 2023-06-25T09:52:39.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-27T09:08:33.000Z (about 3 years ago)
- Last Synced: 2026-01-07T12:28:21.458Z (6 months ago)
- Topics: auto-update, csharp, netcore, netframework
- Language: C#
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoUpdate [](https://nuget.org/packages/AutoUpdateDotNet.Core) [](https://github.com/HeHang0/AutoUpdateDotNet/actions/workflows/core.library.nuget.yml)
AutoUpdate is a library for automatically updating .NET applications. It can check for new update packages, download them, and install them.
## Usage
-------
AutoUpdate is available as [NuGet package](https://www.nuget.org/packages/AutoUpdateDotNet.Core).
```csharp
void NewPackageChecked(AutoUpdate.Core.AutoUpdate sender, PackageCheckedEventArgs e)
{
Console.WriteLine($"[{DateTime.Now}] New Update: {e.Version}");
CancellationTokenSource cts = new CancellationTokenSource();
sender.Update(new SingleInstaller(), cts.Token, new Progress(p =>
{
Console.WriteLine($"[{DateTime.Now}] Download Progress: {p}");
if(p == 50) cts.Cancel();
}));
}
var githubChecker = new GithubChecker("hehang0", "FileViewer", "FileViewer.exe", "v1.3.0");
var autoUpdate = new AutoUpdate.Core.AutoUpdate(new Options(githubChecker));
autoUpdate.NewPackageChecked += NewPackageChecked;
autoUpdate.Start();
```
## Repository
-------
The source code for AutoUpdateDotNet is hosted on GitHub. You can find it at the following URL: [https://github.com/HeHang0/AutoUpdateDotNet](https://github.com/HeHang0/AutoUpdateDotNet)
## License
-------
AutoUpdateDotNet is released under the MIT license. This means you are free to use and modify it, as long as you comply with the terms of the license.