Skip to content

Commit

Permalink
Remove using System.Reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Feb 1, 2025
1 parent 2b0d805 commit 732c3ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2rayN/ServiceLib/Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Principal;
Expand Down Expand Up @@ -502,7 +501,8 @@ public static string GetVersionInfo()
{
try
{
return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(3) ?? "0.0";
var info = FileVersionInfo.GetVersionInfo(GetExePath());
return $"{info.FileMajorPart}.{info.FileMinorPart}.{info.FileBuildPart}";
}
catch (Exception ex)
{
Expand Down

0 comments on commit 732c3ee

Please sign in to comment.