Ghost1372

everything can be handy

UpdateHelper

you can use UpdateHelper for checking application updates from github release page

first you must create a new release tag in github repository, tag version must be in this format : 1.0.0.0
now we can check for update with github username and github repository

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var update = await UpdateHelper.CheckUpdateAsync("Ghost1372", "DevWinUI");

if (update.StableRelease.IsExistNewVersion)
{
Debug.WriteLine(update.StableRelease.ReleaseUrl);
Debug.WriteLine(update.StableRelease.CreatedAt.ToString());
Debug.WriteLine(update.StableRelease.PublishedAt.ToString());

//Asset is List so maybe there is more than one file you can use forech or increase index
Debug.WriteLine(update.StableRelease.Assets[0].Url);
Debug.WriteLine(update.StableRelease.IsPreRelease.ToString());
Debug.WriteLine(update.StableRelease.Assets[0].Size.ToString());
Debug.WriteLine(update.StableRelease.Version);
Debug.WriteLine(update.StableRelease.Changelog);
}
else if (update.PreRelease.IsExistNewVersion)
{
Debug.WriteLine(update.PreRelease.ReleaseUrl);
Debug.WriteLine(update.PreRelease.CreatedAt.ToString());
Debug.WriteLine(update.PreRelease.PublishedAt.ToString());

//Asset is List so maybe there is more than one file you can use forech or increase index
Debug.WriteLine(update.PreRelease.Assets[0].Url);
Debug.WriteLine(update.PreRelease.IsPreRelease.ToString());
Debug.WriteLine(update.PreRelease.Assets[0].Size.ToString());
Debug.WriteLine(update.PreRelease.Version);
Debug.WriteLine(update.PreRelease.Changelog);
}
else
{
Debug.WriteLine("You are using latest version");
}

Demo

you can run demo and see this feature.

0%