Fixed Issue 204.
1.1 --- a/Program.cs Sun May 15 17:06:55 2011 +0000
1.2 +++ b/Program.cs Sun May 15 17:21:27 2011 +0000
1.3 @@ -37,10 +37,12 @@
1.4
1.5 using System;
1.6 using System.IO;
1.7 +using System.Reflection;
1.8 using System.Text;
1.9 using System.Threading;
1.10 using System.Windows.Forms;
1.11 using OpenHardwareMonitor.GUI;
1.12 +using OpenHardwareMonitor.Hardware;
1.13
1.14 namespace OpenHardwareMonitor {
1.15 public static class Program {
1.16 @@ -88,6 +90,16 @@
1.17 return false;
1.18 if (!IsFileAvailable("OpenHardwareMonitorLib.dll"))
1.19 return false;
1.20 +
1.21 + // check if the OpenHardwareMonitorLib assembly has the correct version
1.22 + if (Assembly.GetAssembly(typeof(Computer)).GetName().Version !=
1.23 + Assembly.GetExecutingAssembly().GetName().Version) {
1.24 + MessageBox.Show(
1.25 + "The version of the file OpenHardwareMonitorLib.dll is incompatible.",
1.26 + "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
1.27 + return false;
1.28 + }
1.29 +
1.30 return true;
1.31 }
1.32