diff --git a/TGS.Interface/Client.cs b/TGS.Interface/Client.cs
index b13b16364b..4d36381950 100644
--- a/TGS.Interface/Client.cs
+++ b/TGS.Interface/Client.cs
@@ -14,6 +14,11 @@ namespace TGS.Interface
///
sealed public class Client : IClient
{
+ ///
+ /// Version of the
+ ///
+ public static readonly Version Version = Assembly.GetExecutingAssembly().GetName().Version;
+
///
public IServer Server => server;
@@ -147,10 +152,9 @@ namespace TGS.Interface
///
public bool VersionMismatch(out string errorMessage)
{
- var version = Definitions.Version;
- if (ServerVersion.Major != version.Major || ServerVersion.Minor != version.Minor || ServerVersion.Build != version.Build) //don't care about the patch level
+ if (ServerVersion.Major != Version.Major || ServerVersion.Minor != Version.Minor || ServerVersion.Build != Version.Build) //don't care about the patch level
{
- errorMessage = String.Format("Version mismatch between interface version ({0}) and service version ({1}). Some functionality may crash this program.", version, ServerVersion);
+ errorMessage = String.Format("Version mismatch between interface version ({0}) and service version ({1}). Some functionality may crash this program.", Version, ServerVersion);
return true;
}
errorMessage = null;
diff --git a/TGS.Interface/Definitions.cs b/TGS.Interface/Definitions.cs
index a39fd6ed7c..05cc952c33 100644
--- a/TGS.Interface/Definitions.cs
+++ b/TGS.Interface/Definitions.cs
@@ -28,10 +28,5 @@ namespace TGS.Interface
/// Base name of instance URLs
///
public const string InstanceInterfaceName = MasterInterfaceName + "/Instance";
-
- ///
- /// Version of the interface
- ///
- public static readonly Version Version = Assembly.GetExecutingAssembly().GetName().Version;
}
}