From 738264e941ef32396d5c4887850966c54918e3a7 Mon Sep 17 00:00:00 2001 From: TraceEntertains Date: Sun, 1 Sep 2024 13:10:52 -0400 Subject: [PATCH] No longer self-contained (still single file), hopefully fix single file publish version info, update version number to 0.2.1 --- tns2tool/Program.cs | 9 ++++++--- tns2tool/tns2tool.csproj | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tns2tool/Program.cs b/tns2tool/Program.cs index dc79187..f5efd5c 100644 --- a/tns2tool/Program.cs +++ b/tns2tool/Program.cs @@ -12,6 +12,7 @@ public class Program { public static byte VersionMajor; public static byte VersionMinor; + public static byte VersionRevision; public static string InformationalVersion; public static string GetFileVersion() @@ -21,11 +22,13 @@ public static string GetFileVersion() static void PopulateVersionInfo() { - Assembly assembly = Assembly.GetEntryAssembly()!; - Version version = assembly.GetName().Version!; + Version version = Assembly.GetEntryAssembly()!.GetName().Version!; VersionMajor = (byte)version.Major; VersionMinor = (byte)version.Minor; - InformationalVersion = FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion!; + VersionRevision = (byte)version.Revision; + + InformationalVersion = + FileVersionInfo.GetVersionInfo(Environment.ProcessPath!).ProductVersion!; } static void Main(string[] args) diff --git a/tns2tool/tns2tool.csproj b/tns2tool/tns2tool.csproj index 52b8977..e49a738 100644 --- a/tns2tool/tns2tool.csproj +++ b/tns2tool/tns2tool.csproj @@ -2,11 +2,12 @@ true + false Exe net8.0 enable enable - 0.2 + 0.2.1 false Debug;Release;FullRelease win-x64;osx-x64;linux-x64