Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11121 for stable


Ignore:
Timestamp:
07/07/14 17:00:14 (10 years ago)
Author:
ascheibe
Message:

#2153 merged r11082, r11113, r11117 into stable

Location:
stable
Files:
19 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.Access/3.3/ClientInformationUtils.cs

    r9456 r11121  
    3030using HeuristicLab.Data;
    3131using HeuristicLab.Optimization;
     32using HeuristicLab.PluginInfrastructure;
    3233
    3334namespace HeuristicLab.Clients.Access {
     
    7273
    7374    public static string GetHLVersion() {
    74       FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
    75       return versionInfo.FileVersion;
     75      return AssemblyHelpers.GetFileVersion(Assembly.GetExecutingAssembly());
    7676    }
    7777
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Core.cs

    r9456 r11121  
    204204      TS.Task.Factory.StartNew(HandleCalculateTask, jobId)
    205205      .ContinueWith((t) => {
    206         SlaveStatusInfo.IncrementExceptionOccured();
     206        SlaveStatusInfo.IncrementTasksFailed();
    207207        SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    208208      }, TaskContinuationOptions.OnlyOnFaulted);
     
    212212      TS.Task.Factory.StartNew(HandleStopTask, jobId)
    213213       .ContinueWith((t) => {
    214          SlaveStatusInfo.IncrementExceptionOccured();
     214         SlaveStatusInfo.IncrementTasksFailed();
    215215         SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    216216       }, TaskContinuationOptions.OnlyOnFaulted);
     
    220220      TS.Task.Factory.StartNew(HandlePauseTask, jobId)
    221221       .ContinueWith((t) => {
    222          SlaveStatusInfo.IncrementExceptionOccured();
     222         SlaveStatusInfo.IncrementTasksFailed();
    223223         SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    224224       }, TaskContinuationOptions.OnlyOnFaulted);
     
    228228      TS.Task.Factory.StartNew(HandleAbortTask, jobId)
    229229       .ContinueWith((t) => {
    230          SlaveStatusInfo.IncrementExceptionOccured();
     230         SlaveStatusInfo.IncrementTasksFailed();
    231231         SlaveClientCom.Instance.LogMessage(t.Exception.ToString());
    232232       }, TaskContinuationOptions.OnlyOnFaulted);
     
    328328      this.taskManager.TaskStopped += new EventHandler<EventArgs<SlaveTask, TaskData>>(taskManager_TaskStopped);
    329329      this.taskManager.TaskFailed += new EventHandler<EventArgs<Tuple<SlaveTask, TaskData, Exception>>>(taskManager_TaskFailed);
    330       this.taskManager.ExceptionOccured += new EventHandler<EventArgs<SlaveTask, Exception>>(taskManager_ExceptionOccured);
    331330      this.taskManager.TaskAborted += new EventHandler<EventArgs<SlaveTask>>(taskManager_TaskAborted);
    332331    }
     
    391390      }
    392391      catch (TaskNotFoundException ex) {
    393         SlaveStatusInfo.IncrementExceptionOccured();
     392        SlaveStatusInfo.IncrementTasksFailed();
    394393        SlaveClientCom.Instance.LogMessage(ex.ToString());
    395394      }
    396395      catch (Exception ex) {
    397         SlaveStatusInfo.IncrementExceptionOccured();
     396        SlaveStatusInfo.IncrementTasksFailed();
    398397        SlaveClientCom.Instance.LogMessage(ex.ToString());
    399398      }
    400     }
    401 
    402     private void taskManager_ExceptionOccured(object sender, EventArgs<SlaveTask, Exception> e) {
    403       SlaveStatusInfo.DecrementUsedCores(e.Value.CoresNeeded);
    404       SlaveStatusInfo.IncrementExceptionOccured();
    405       heartbeatManager.AwakeHeartBeatThread();
    406       SlaveClientCom.Instance.LogMessage(string.Format("Exception occured for task {0}: {1}", e.Value.TaskId, e.Value2.ToString()));
    407       wcfService.UpdateJobState(e.Value.TaskId, TaskState.Waiting, e.Value2.ToString());
    408399    }
    409400
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs

    r9456 r11121  
    8585        task.Start();
    8686        if (!startTaskSem.WaitOne(Settings.Default.ExecutorSemTimeouts)) {
    87           taskDataInvalid = true;
    8887          throw new TimeoutException("Timeout when starting the task. TaskStarted event was not fired.");
    8988        }
    9089      }
    9190      catch (Exception e) {
    92         this.CurrentException = e;
    93         taskDataInvalid = true;
    94         Task_TaskFailed(this, new EventArgs<Exception>(e));
    95       } finally {
     91        HandleStartStopPauseError(e);
     92      }
     93      finally {
    9694        taskStartedSem.Set();
    9795      }
     
    103101      taskStartedSem.WaitOne(Settings.Default.ExecutorSemTimeouts);
    104102      if (task == null) {
    105         CurrentException = new Exception("Pausing task " + this.TaskId + ": Task is null");
    106         executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured);
     103        HandleStartStopPauseError(new Exception("Pausing task " + this.TaskId + ": Task is null"));
    107104        return;
    108105      }
     
    112109          task.Pause();
    113110          //we need to block the pause...
    114           pauseStopSem.WaitOne();
     111          if (!pauseStopSem.WaitOne(Settings.Default.ExecutorSemTimeouts)) {
     112            throw new Exception("Pausing task " + this.TaskId + " timed out.");
     113          }
    115114        }
    116115        catch (Exception ex) {
    117           CurrentException = new Exception("Error pausing task " + this.TaskId + ": " + ex.ToString());
    118           executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured);
     116          HandleStartStopPauseError(ex);
    119117        }
    120118      }
     
    125123      // wait until task is started. if this does not happen, the Task is null an we give up
    126124      taskStartedSem.WaitOne(Settings.Default.ExecutorSemTimeouts);
     125      wasTaskAborted = true;
     126
    127127      if (task == null) {
    128         CurrentException = new Exception("Stopping task " + this.TaskId + ": Task is null");
    129         executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured);
    130       }
    131       wasTaskAborted = true;
     128        HandleStartStopPauseError(new Exception("Stopping task " + this.TaskId + ": Task is null"));
     129        return;
     130      }
    132131
    133132      if ((ExecutionState == ExecutionState.Started) || (ExecutionState == ExecutionState.Paused)) {
    134133        try {
    135134          task.Stop();
    136           pauseStopSem.WaitOne();
     135          if (!pauseStopSem.WaitOne(Settings.Default.ExecutorSemTimeouts)) {
     136            throw new Exception("Stopping task " + this.TaskId + " timed out.");
     137          }
    137138        }
    138139        catch (Exception ex) {
    139           CurrentException = new Exception("Error stopping task " + this.TaskId + ": " + ex.ToString());
    140           executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured);
     140          HandleStartStopPauseError(ex);
    141141        }
    142142      }
     
    190190      if (task != null && task.ExecutionState == ExecutionState.Started) {
    191191        throw new InvalidStateException("Task is still running");
     192      }
     193
     194      TaskData taskData = null;
     195      if (task == null) {
     196        if (CurrentException == null) {
     197          CurrentException = new Exception("Task with id " + this.TaskId + " is null, sending empty task");
     198        }
    192199      } else {
    193         TaskData taskData = new TaskData();
    194         if (task == null) {
    195           //send empty task and save exception
    196           taskData.Data = PersistenceUtil.Serialize(new TaskData());
    197           if (CurrentException == null) {
    198             CurrentException = new Exception("Task with id " + this.TaskId + " is null, sending empty task");
    199           }
    200         } else {
    201           taskData.Data = PersistenceUtil.Serialize(task);
    202         }
     200        taskData = new TaskData();
     201        taskData.Data = PersistenceUtil.Serialize(task);
    203202        taskData.TaskId = TaskId;
    204         return taskData;
    205       }
     203      }
     204      return taskData;
    206205    }
    207206
     
    211210      task = null;
    212211    }
     212
     213    private void HandleStartStopPauseError(Exception e) {
     214      taskDataInvalid = true;
     215      Task_TaskFailed(this, new EventArgs<Exception>(e));
     216    }
    213217  }
    214218}
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/ExecutorMessage.cs

    r9456 r11121  
    3030    TaskStopped,
    3131    TaskFailed,
    32     StopExecutorMonitoringThread,
    33     ExceptionOccured
     32    StopExecutorMonitoringThread
    3433  }
    3534
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Manager/ConfigManager.cs

    r9456 r11121  
    117117      st.JobsFetched = SlaveStatusInfo.TasksFetched;
    118118      st.JobsFailed = SlaveStatusInfo.TasksFailed;
    119       st.ExceptionsOccured = SlaveStatusInfo.ExceptionsOccured;
    120119
    121120      st.Jobs = jobManager.GetExecutionTimes().Select(x => new TaskStatus { TaskId = x.Key, ExecutionTime = x.Value }).ToList();
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Manager/HeartbeatManager.cs

    r9456 r11121  
    2424using System.Threading;
    2525using HeuristicLab.Clients.Hive.SlaveCore.Properties;
    26 using HeuristicLab.Common;
    2726
    2827namespace HeuristicLab.Clients.Hive.SlaveCore {
     
    115114              if (msgs == null) {
    116115                SlaveClientCom.Instance.LogMessage("Error getting response from HB");
    117                 OnExceptionOccured(new Exception("Error getting response from HB"));
    118116              } else {
    119117                SlaveClientCom.Instance.LogMessage("HB Response received (" + msgs.Count + "): ");
     
    126124        catch (Exception e) {
    127125          SlaveClientCom.Instance.LogMessage("Heartbeat thread failed: " + e.ToString());
    128           OnExceptionOccured(e);
    129126        }
    130127        waitHandle.WaitOne(this.interval);
     
    132129      SlaveClientCom.Instance.LogMessage("Heartbeat thread stopped");
    133130    }
    134 
    135     #region Eventhandler
    136     public event EventHandler<EventArgs<Exception>> ExceptionOccured;
    137     private void OnExceptionOccured(Exception e) {
    138       var handler = ExceptionOccured;
    139       if (handler != null) handler(this, new EventArgs<Exception>(e));
    140     }
    141     #endregion
    142131  }
    143132}
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/Manager/TaskManager.cs

    r9456 r11121  
    7171      try {
    7272        if (slaveTasks.ContainsKey(task.Id)) {
    73           SlaveStatusInfo.IncrementExceptionOccured();
     73          SlaveStatusInfo.IncrementTasksFailed();
    7474          throw new TaskAlreadyRunningException(task.Id);
    7575        } else {
     
    185185      slaveTask.TaskStopped += new EventHandler<EventArgs<Guid>>(slaveTask_TaskStopped);
    186186      slaveTask.TaskFailed += new EventHandler<EventArgs<Guid, Exception>>(slaveTask_TaskFailed);
    187       slaveTask.ExceptionOccured += new EventHandler<EventArgs<Guid, Exception>>(slaveTask_ExceptionOccured);
    188187    }
    189188
     
    193192      slaveTask.TaskStopped -= new EventHandler<EventArgs<Guid>>(slaveTask_TaskStopped);
    194193      slaveTask.TaskFailed -= new EventHandler<EventArgs<Guid, Exception>>(slaveTask_TaskFailed);
    195       slaveTask.ExceptionOccured -= new EventHandler<EventArgs<Guid, Exception>>(slaveTask_ExceptionOccured);
    196194    }
    197195
     
    220218      try {
    221219        taskData = slaveTask.GetTaskData();
    222         if (taskData == null) throw new SerializationException();
    223220        SlaveStatusInfo.IncrementTasksFinished();
    224221        OnTaskPaused(slaveTask, taskData);
     
    243240      try {
    244241        taskData = slaveTask.GetTaskData();
    245         if (taskData == null) throw new SerializationException();
    246242        SlaveStatusInfo.IncrementTasksFinished();
    247243        OnTaskStopped(slaveTask, taskData);
     
    266262      try {
    267263        taskData = slaveTask.GetTaskData();
    268         if (taskData == null) throw new SerializationException();
    269264      }
    270265      catch { /* taskData will be null */ }
    271266      SlaveStatusInfo.IncrementTasksFailed();
    272267      OnTaskFailed(slaveTask, taskData, e.Value2);
    273     }
    274 
    275     private void slaveTask_ExceptionOccured(object sender, EventArgs<Guid, Exception> e) {
    276       SlaveTask slaveTask;
    277       slaveTasksLocker.EnterUpgradeableReadLock();
    278       try {
    279         slaveTask = slaveTasks[e.Value];
    280         RemoveSlaveTask(e.Value, slaveTask);
    281       }
    282       finally { slaveTasksLocker.ExitUpgradeableReadLock(); }
    283 
    284       SlaveStatusInfo.IncrementExceptionOccured();
    285       OnExceptionOccured(slaveTask, e.Value2);
    286268    }
    287269    #endregion
     
    312294    }
    313295
    314     public event EventHandler<EventArgs<SlaveTask, Exception>> ExceptionOccured;
    315     private void OnExceptionOccured(SlaveTask slaveTask, Exception exception) {
    316       var handler = ExceptionOccured;
    317       if (handler != null) handler(this, new EventArgs<SlaveTask, Exception>(slaveTask, exception));
    318     }
    319 
    320296    public event EventHandler<EventArgs<SlaveTask>> TaskAborted;
    321297    private void OnTaskAborted(SlaveTask slaveTask) {
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/SlaveStatusInfo.cs

    r9456 r11121  
    3131    private static int tasksAborted;  // server sent abort
    3232    private static int tasksFailed;   // tasks that failed in the sandbox
    33     private static int exceptionsOccured; // number jobs failed caused by the business logic, not a faulted task
    3433    private static int usedCores;    // number of cores currently used
    3534
     
    6059    }
    6160
    62     public static int ExceptionsOccured {
    63       get { return exceptionsOccured; }
    64     }
    65 
    6661    public static void IncrementTasksStarted() {
    6762      Interlocked.Increment(ref tasksStarted);
     
    8479    }
    8580
    86     public static void IncrementExceptionOccured() {
    87       Interlocked.Increment(ref exceptionsOccured);
    88     }
    89 
    9081    public static void IncrementUsedCores(int val) {
    9182      Interlocked.Add(ref usedCores, val);
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/SlaveTask.cs

    r9456 r11121  
    4343    public Guid TaskId { get; private set; }
    4444    public bool IsPrepared { get; private set; }
     45    private TaskData originalTaskData;
    4546
    4647    private int coresNeeded;
     
    7475      try {
    7576        this.TaskId = task.Id;
     77        originalTaskData = taskData;
    7678        Prepare(task);
    7779        StartTaskInAppDomain(taskData);
     
    143145        while (repeat > 0) {
    144146          try {
    145             waitForStartBeforeKillSem.WaitOne();
     147            waitForStartBeforeKillSem.WaitOne(Settings.Default.ExecutorSemTimeouts);
    146148            AppDomain.Unload(appDomain);
    147149            waitForStartBeforeKillSem.Dispose();
     
    164166    private void AppDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
    165167      DisposeAppDomain();
    166       OnExceptionOccured(new Exception("Unhandled exception: " + e.ExceptionObject.ToString()));
     168      OnTaskFailed(new Exception("Unhandled exception: " + e.ExceptionObject.ToString()));
    167169    }
    168170
     
    171173      try {
    172174        data = executor.GetTaskData();
     175        //this means that there was a problem executing the task
     176        if (data == null) return originalTaskData;
    173177      }
    174178      catch (Exception ex) {
     
    233237            executorMonitoringRun = false;
    234238            break;
    235 
    236           case ExecutorMessageType.ExceptionOccured:
    237             executorMonitoringRun = false;
    238             DisposeAppDomain();
    239             if (executor.CurrentException != null) {
    240               OnExceptionOccured(executor.CurrentException);
    241             } else {
    242               OnExceptionOccured(new Exception(string.Format("Unknow exception occured in Executor for task {0}", TaskId)));
    243             }
    244             break;
    245239        }
    246240      }
     
    277271      if (handler != null) handler(this, new EventArgs<Guid, Exception>(this.TaskId, exception));
    278272    }
    279 
    280     public event EventHandler<EventArgs<Guid, Exception>> ExceptionOccured;
    281     private void OnExceptionOccured(Exception exception) {
    282       var handler = ExceptionOccured;
    283       if (handler != null) handler(this, new EventArgs<Guid, Exception>(this.TaskId, exception));
    284     }
    285273  }
    286274}
  • stable/HeuristicLab.Clients.Hive.Slave/3.3/StatusCommons.cs

    r9456 r11121  
    5151    public int JobsFailed { get; set; }
    5252    [DataMember]
    53     public int ExceptionsOccured { get; set; }
    54     [DataMember]
    5553    public List<TaskStatus> Jobs { get; set; }
    5654    [DataMember]
     
    5856
    5957    public override string ToString() {
    60       return string.Format("Status: {0}, Fetc,Start,Fin,Abor,Fail,Exc: {1},{2},{3},{4},{5},{6}",
    61         Status, JobsFetched, JobsStarted, JobsFinished, JobsAborted, JobsFailed, ExceptionsOccured);
     58      return string.Format("Status: {0}, Fetc,Start,Fin,Abor,Fail,Exc: {1},{2},{3},{4},{5}",
     59        Status, JobsFetched, JobsStarted, JobsFinished, JobsAborted, JobsFailed);
    6260    }
    6361  }
  • stable/HeuristicLab.Core/3.3/OperatorExecutionException.cs

    r9456 r11121  
    2121
    2222using System;
    23 using System.Diagnostics;
     23using HeuristicLab.PluginInfrastructure;
    2424
    2525namespace HeuristicLab.Core {
     
    3434      get {
    3535        string name = "\"" + op.Name + "\"";
     36        var assembly = op.GetType().Assembly;
    3637        if (!op.Name.Equals(op.ItemName)) name += " (" + op.ItemName + ")";
    37         if (!string.IsNullOrEmpty(op.GetType().Assembly.Location)) {
    38           var fvi = FileVersionInfo.GetVersionInfo(op.GetType().Assembly.Location);
    39           name += " [" + fvi.FileName + ": " + fvi.FileVersion + "]";
     38        if (!string.IsNullOrEmpty(assembly.Location)) {
     39          name += " [" + assembly.Location + ": " + AssemblyHelpers.GetFileVersion(assembly) + "]";
    4040        }
    4141        if (InnerException == null)
  • stable/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.cs

    r9456 r11121  
    2222using System.Collections.Generic;
    2323using System.ComponentModel;
    24 using System.Diagnostics;
    2524using System.IO;
    2625using System.Linq;
     
    3736      : base() {
    3837      InitializeComponent();
    39       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    40       Text = "HeuristicLab Plugin Manager " + pluginInfrastructureVersion.FileVersion;
     38      Text = "HeuristicLab Plugin Manager " + AssemblyHelpers.GetFileVersion(GetType().Assembly);
    4139
    4240      pluginManager.PluginLoaded += pluginManager_PluginLoaded;
  • stable/HeuristicLab.PluginInfrastructure/3.3/Advanced/PluginUpdaterForm.cs

    r9456 r11121  
    2222using System.Collections.Generic;
    2323using System.ComponentModel;
    24 using System.Diagnostics;
    2524using System.IO;
    2625using System.Linq;
     
    3938      : base() {
    4039      InitializeComponent();
    41       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    42       Text = "HeuristicLab Plugin Manager " + pluginInfrastructureVersion.FileVersion;
     40      Text = "HeuristicLab Plugin Manager " + AssemblyHelpers.GetFileVersion(GetType().Assembly);
    4341      pluginManager.PluginLoaded += pluginManager_PluginLoaded;
    4442      pluginManager.PluginUnloaded += pluginManager_PluginUnloaded;
  • stable/HeuristicLab.PluginInfrastructure/3.3/AssemblyHelpers.cs

    r11113 r11121  
    3434      object[] attributes = assembly.GetCustomAttributes(typeof(T), false);
    3535      if (attributes.Length == 0) {
    36         throw new Exception(string.Format("No attributes of type {0} found in assembly {1}", typeof(T).Name,
     36        throw new InvalidOperationException(string.Format("No attributes of type {0} found in assembly {1}", typeof(T).Name,
    3737          assembly.FullName));
    3838      }
     
    4141      var propertyInfo = attribute.GetType().GetProperty(propertyName);
    4242      if (propertyInfo == null) {
    43         throw new Exception(string.Format("No property {0} found in attribute {1}, assembly: {2}",
     43        throw new InvalidOperationException(string.Format("No property {0} found in attribute {1}, assembly: {2}",
    4444          propertyName, typeof(T).Name, assembly.FullName));
    4545      }
  • stable/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorHandling.cs

    r9456 r11121  
    2121
    2222using System;
    23 using System.Diagnostics;
    2423using System.Windows.Forms;
    2524
     
    3130      } else {
    3231        string message =
    33           "HeuristicLab version: " + FileVersionInfo.GetVersionInfo(typeof(ErrorHandling).Assembly.Location).FileVersion + Environment.NewLine +
     32          "HeuristicLab version: " + AssemblyHelpers.GetFileVersion(typeof(ErrorHandling).Assembly) + Environment.NewLine +
    3433          exception.GetType().Name + ": " + exception.Message + Environment.NewLine +
    3534                         exception.StackTrace;
  • stable/HeuristicLab.PluginInfrastructure/3.3/HeuristicLab.PluginInfrastructure-3.3.csproj

    r8818 r11121  
    215215      <DependentUpon>PluginView.cs</DependentUpon>
    216216    </Compile>
     217    <Compile Include="AssemblyHelpers.cs" />
    217218    <Compile Include="CommandLineArgumentHandling\Arguments\OpenArgument.cs" />
    218219    <Compile Include="CommandLineArgumentHandling\Arguments\HideStarterArgument.cs" />
  • stable/HeuristicLab.PluginInfrastructure/3.3/Starter/AboutDialog.cs

    r9456 r11121  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Diagnostics;
    2524using System.Linq;
    2625using System.Reflection;
     
    8079
    8180    private string GetVersion() {
    82       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    83       return pluginInfrastructureVersion.FileVersion;
     81      return AssemblyHelpers.GetFileVersion(GetType().Assembly);
    8482    }
    8583
  • stable/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs

    r9456 r11121  
    2121
    2222using System;
    23 using System.Diagnostics;
    2423using System.Linq;
    2524using System.Reflection;
     
    4544      RegisterPluginManagerEventHandlers();
    4645
    47       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    48       versionLabel.Text = "Version " + pluginInfrastructureVersion.FileVersion;
     46      versionLabel.Text = "Version " + AssemblyHelpers.GetFileVersion(GetType().Assembly);
    4947      infoLabel.Text = "";
    5048
  • stable/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs

    r9456 r11121  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Diagnostics;
    2524using System.IO;
    2625using System.Linq;
     
    6059      smallImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.HeuristicLab.ToBitmap());
    6160      smallImageList.Images.Add(HeuristicLab.PluginInfrastructure.Resources.UpdateAvailable.ToBitmap());
    62       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    63       Text = "HeuristicLab " + pluginInfrastructureVersion.FileVersion;
     61      Text = "HeuristicLab " + AssemblyHelpers.GetFileVersion(GetType().Assembly);
    6462
    6563      string pluginPath = Path.GetFullPath(Application.StartupPath);
     
    204202
    205203    private void AddPluginManagerItem() {
    206       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
    207204      pluginManagerListViewItem = new ListViewItem(pluginManagerItemName, 0);
    208205      pluginManagerListViewItem.Group = applicationsListView.Groups["Plugin Management"];
    209       pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, pluginInfrastructureVersion.FileVersion));
     206      pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, AssemblyHelpers.GetFileVersion(GetType().Assembly)));
    210207      pluginManagerListViewItem.SubItems.Add(new ListViewItem.ListViewSubItem(pluginManagerListViewItem, "Install, upgrade or delete plugins"));
    211208      pluginManagerListViewItem.ToolTipText = "Install, upgrade or delete plugins";
Note: See TracChangeset for help on using the changeset viewer.