Skip to content

Commit db25fde

Browse files
committed
Revert "Remove using System.Reflection"
This reverts commit 732c3ee.
1 parent 732c3ee commit db25fde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

v2rayN/ServiceLib/Common/Utils.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Net;
44
using System.Net.NetworkInformation;
55
using System.Net.Sockets;
6+
using System.Reflection;
67
using System.Runtime.InteropServices;
78
using System.Security.Cryptography;
89
using System.Security.Principal;
@@ -501,8 +502,7 @@ public static string GetVersionInfo()
501502
{
502503
try
503504
{
504-
var info = FileVersionInfo.GetVersionInfo(GetExePath());
505-
return $"{info.FileMajorPart}.{info.FileMinorPart}.{info.FileBuildPart}";
505+
return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(3) ?? "0.0";
506506
}
507507
catch (Exception ex)
508508
{

0 commit comments

Comments
 (0)