use assembly file version instead of product version for update check
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
|
Imports System.Reflection
|
||||||
|
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
Imports Newtonsoft.Json.Converters
|
Imports Newtonsoft.Json.Converters
|
||||||
@@ -21,10 +22,11 @@ Public Class AppUpdater
|
|||||||
Dim hasUpdate As Boolean = False
|
Dim hasUpdate As Boolean = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
Dim appVersion As Version = Assembly.GetExecutingAssembly().GetName().Version
|
||||||
Dim result = Await httpClient.GetStringAsync(UPDATE_URL)
|
Dim result = Await httpClient.GetStringAsync(UPDATE_URL)
|
||||||
info = JsonConvert.DeserializeObject(Of UpdateInfo)(result)
|
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
|
hasUpdate = True
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
Reference in New Issue
Block a user