diff --git a/v2rayN/ServiceLib/Common/SemanticVersion.cs b/v2rayN/ServiceLib/Common/SemanticVersion.cs index ec4c4931c0..c631de5b3f 100644 --- a/v2rayN/ServiceLib/Common/SemanticVersion.cs +++ b/v2rayN/ServiceLib/Common/SemanticVersion.cs @@ -27,7 +27,7 @@ public SemanticVersion(string version) this.minor = int.Parse(parts[1]); this.patch = 0; } - else if (parts.Length == 3) + else if (parts.Length == 3 || parts.Length == 4) { this.major = int.Parse(parts[0]); this.minor = int.Parse(parts[1]); diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index ec161ced0c..dd36758d7e 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -593,8 +593,7 @@ public static string GetVersionInfo() { try { - string location = GetExePath(); - return FileVersionInfo.GetVersionInfo(location)?.FileVersion ?? "0.0"; + return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString() ?? "0.0"; } catch (Exception ex) { diff --git a/v2rayN/ServiceLib/ServiceLib.csproj b/v2rayN/ServiceLib/ServiceLib.csproj index bc138c00cc..b37840c50f 100644 --- a/v2rayN/ServiceLib/ServiceLib.csproj +++ b/v2rayN/ServiceLib/ServiceLib.csproj @@ -4,6 +4,7 @@ net8.0 enable enable + 6.55 @@ -12,7 +13,7 @@ - + diff --git a/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj b/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj index c5496803fc..f0f36b6513 100644 --- a/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj +++ b/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj @@ -7,7 +7,6 @@ v2rayN.ico true true - 6.55 @@ -26,8 +25,8 @@ - - + + diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index 9318fe4d28..01628743be 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -10,7 +10,6 @@ enable v2rayN.ico Copyright © 2017-2024 (GPLv3) - 6.56 7.0