diff --git a/src/NRedisStack/Auxiliary.cs b/src/NRedisStack/Auxiliary.cs index 207f39ac..d5555fb7 100644 --- a/src/NRedisStack/Auxiliary.cs +++ b/src/NRedisStack/Auxiliary.cs @@ -1,4 +1,3 @@ -using System.Xml.Linq; using NRedisStack.Core; using NRedisStack.RedisStackCommands; using StackExchange.Redis; @@ -132,23 +131,8 @@ public async static Task> ExecuteBroadcastAsync(this IDatabase public static string GetNRedisStackVersion() { - XDocument csprojDocument = GetCsprojDocument(); - - // Find the Version element and get its value. - var versionElement = csprojDocument.Root! - .Descendants("Version") - .FirstOrDefault(); - - return versionElement!.Value; - } - - private static XDocument GetCsprojDocument() - { - string csprojFilePath = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "..", "src", "NRedisStack", "NRedisStack.csproj"); - - // Load the .csproj file. - var csprojDocument = XDocument.Load(csprojFilePath); - return csprojDocument; + Version version = typeof(Auxiliary).Assembly.GetName().Version!; + return $"{version.Major}.{version.Minor}.{version.Build}"; } } } \ No newline at end of file diff --git a/src/NRedisStack/NRedisStack.csproj b/src/NRedisStack/NRedisStack.csproj index 56278688..3441d99c 100644 --- a/src/NRedisStack/NRedisStack.csproj +++ b/src/NRedisStack/NRedisStack.csproj @@ -9,9 +9,9 @@ Redis OSS .Net Client for Redis Stack README.md - 0.10.0 - 0.10.0 - 0.10.0 + 0.10.1 + 0.10.1 + 0.10.1