use assembly file version instead of product version for update check

This commit is contained in:
2024-06-17 20:20:13 +02:00
parent b21d33237f
commit f07fad0a80

View File

@@ -1,5 +1,6 @@
Imports System.IO
Imports System.Net.Http
Imports System.Reflection
Imports Newtonsoft.Json
Imports Newtonsoft.Json.Converters
@@ -21,10 +22,11 @@ Public Class AppUpdater
Dim hasUpdate As Boolean = False
Try
Dim appVersion As Version = Assembly.GetExecutingAssembly().GetName().Version
Dim result = Await httpClient.GetStringAsync(UPDATE_URL)
info = JsonConvert.DeserializeObject(Of UpdateInfo)(result)
If info IsNot Nothing AndAlso info.Version < New Version(Application.ProductVersion) Then
If info IsNot Nothing AndAlso info.Version < appVersion Then
hasUpdate = True
End If
Catch ex As Exception