Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11113 for trunk


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

#2153 fixed assembly file version lookup to also work in sandboxes.
FileVersionInfo.GetVersionInfo(..) needs LinkDemand which we don't allow in a Hive sandbox and therefore throws an exceptions. This leads to tasks that get rescheduled or just stay paused on the slave and never get sent back to the server.

Location:
trunk/sources
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Access/3.3/ClientInformationUtils.cs

    r9456 r11113  
    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
  • trunk/sources/HeuristicLab.Core/3.3/OperatorExecutionException.cs

    r9456 r11113  
    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)
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.cs

    r9456 r11113  
    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;
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/PluginUpdaterForm.cs

    r9456 r11113  
    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;
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorHandling.cs

    r9456 r11113  
    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;
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/HeuristicLab.PluginInfrastructure-3.3.csproj

    r8818 r11113  
    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" />
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/AboutDialog.cs

    r9456 r11113  
    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
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs

    r9456 r11113  
    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
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs

    r9456 r11113  
    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.