https://github.com/codedead/updatemanager
Manage updates for your .NET application using this simple library
https://github.com/codedead/updatemanager
autoupdate autoupdater csharp manage net updatemanager updater updates updating visualbasic
Last synced: 3 months ago
JSON representation
Manage updates for your .NET application using this simple library
- Host: GitHub
- URL: https://github.com/codedead/updatemanager
- Owner: CodeDead
- License: gpl-3.0
- Created: 2017-03-10T16:52:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T00:26:07.000Z (over 5 years ago)
- Last Synced: 2025-06-06T01:39:42.840Z (4 months ago)
- Topics: autoupdate, autoupdater, csharp, manage, net, updatemanager, updater, updates, updating, visualbasic
- Language: C#
- Homepage: https://codedead.com
- Size: 158 KB
- Stars: 14
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UpdateManager
UpdateManager was created by DeadLine. This library was developed free of charge.This library can be used to check for application updates. It is designed for WPF and Windows Forms applications.
In order to use it, you require an XML or JSON file on a remote or local server that represents the Update class.## Dependencies
* [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48)## Usage
UpdateManager is available as a [NuGet package](https://www.nuget.org/packages/CodeDead.UpdateManager/). You can find it here:
https://www.nuget.org/packages/CodeDead.UpdateManager/Sample projects can be found here:
https://github.com/CodeDead/UpdateManager/tree/master/UpdateManager.Sample
https://github.com/CodeDead/UpdateManager/tree/master/UpdateManager.Sample.WPFCreate a new *UpdateManager* object like this:
```C#
// Import statement
using CodeDead.UpdateManager.Classes;// Initialize a new UpdateManager object
UpdateManager updateManager = new UpdateManager();
```You can check for updates like this:
```C#
try
{
// Retrieve the latest Update object from the remote location
Update update = updateManager.GetLatestVersion();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Application title", MessageBoxButton.OK, MessageBoxImage.Error);
}
```
## Update types
Updates can be stored and parsed in two different formats: *JSON* or *XML*. By default, the *DataType* property will be set to *Json*. You can change the *DataType* property by setting the appropriate property on the *UpdateManager* object:
```C#
// Initialize a new UpdateManager object
UpdateManager updateManager = new UpdateManager();
// Set the data type of the remote Update object representation
updateManager.DataType = DataType.Json;
``````C#
// Initialize a new UpdateManager object
UpdateManager updateManager = new UpdateManager();
// Set the data type of the remote Update object representation
updateManager.DataType = DataType.Xml;
```### JSON Update example
```JSON
{
"MajorVersion": 1,
"MinorVersion": 0,
"BuildVersion": 0,
"RevisionVersion": 0,
"UpdateUrl": "https://codedead.com/update.exe",
"InfoUrl": "https://codedead.com",
"UpdateInfo": "A new version is now available. Please click the download button to download version 1.0.0.0"
}
```### XML Update example
```XML1
0
0
0
https://example.com/update.exe
https://codedead.com/
A new version is now available. Please click the download button to download version 1.0.0.0```
# About
This library is maintained by CodeDead. You can find more about us using the following links:
* [Website](https://codedead.com)
* [Twitter](https://twitter.com/C0DEDEAD)
* [Facebook](https://facebook.com/deadlinecodedead)
* [Reddit](https://reddit.com/r/CodeDead/)We would also like to thank JetBrains for the open source license that they granted us to work with wonderful tools such as [Rider](https://jetbrains.com/rider) and [Resharper](https://jetbrains.com/resharper).