# HG changeset patch # User moel.mich # Date 1305480087 0 # Node ID 48d7e8d6c0db23e5cad969b08077eb03ab6ab022 # Parent 0820c0558727a3436a42738065fd71cd933096fa Fixed Issue 204. diff -r 0820c0558727 -r 48d7e8d6c0db Program.cs --- a/Program.cs Sun May 15 17:06:55 2011 +0000 +++ b/Program.cs Sun May 15 17:21:27 2011 +0000 @@ -37,10 +37,12 @@ using System; using System.IO; +using System.Reflection; using System.Text; using System.Threading; using System.Windows.Forms; using OpenHardwareMonitor.GUI; +using OpenHardwareMonitor.Hardware; namespace OpenHardwareMonitor { public static class Program { @@ -88,6 +90,16 @@ return false; if (!IsFileAvailable("OpenHardwareMonitorLib.dll")) return false; + + // check if the OpenHardwareMonitorLib assembly has the correct version + if (Assembly.GetAssembly(typeof(Computer)).GetName().Version != + Assembly.GetExecutingAssembly().GetName().Version) { + MessageBox.Show( + "The version of the file OpenHardwareMonitorLib.dll is incompatible.", + "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } + return true; }