diff --git a/RabbitMQ.Stream.Client/Version.cs b/RabbitMQ.Stream.Client/Version.cs index cf2e4367..f7865d83 100644 --- a/RabbitMQ.Stream.Client/Version.cs +++ b/RabbitMQ.Stream.Client/Version.cs @@ -2,7 +2,6 @@ // 2.0, and the Mozilla Public License, version 2.0. // Copyright (c) 2017-2023 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. -using System.Diagnostics; using System.Reflection; namespace RabbitMQ.Stream.Client @@ -11,9 +10,8 @@ public static class Version { static Version() { - var a = Assembly.GetAssembly(typeof(Version)); - var fvi = FileVersionInfo.GetVersionInfo(a.Location); - VersionString = fvi.ProductVersion; + var attr = typeof(Version).Assembly.GetCustomAttribute(); + VersionString = attr?.InformationalVersion; } public static string VersionString { get; }