Changeset 17110
- Timestamp:
- 07/08/19 15:13:43 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Scripting/3.3/Script.cs
r16565 r17110 29 29 using System.Reflection; 30 30 using System.Text; 31 using System.Text.RegularExpressions; 32 using HEAL.Attic; 31 33 using HeuristicLab.Common; 32 34 using HeuristicLab.Common.Resources; 33 35 using HeuristicLab.Core; 34 using HEAL.Attic;35 36 using Microsoft.CSharp; 36 37 … … 122 123 123 124 public virtual IEnumerable<Assembly> GetAssemblies() { 124 var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic && File.Exists(a.Location)).ToList(); 125 var assemblies = AppDomain.CurrentDomain.GetAssemblies() 126 .Where(a => !a.IsDynamic && File.Exists(a.Location)) 127 .GroupBy(x => Regex.Replace(Path.GetFileName(x.Location), @"-[\d.]+\.dll$", "")) 128 .Select(x => x.OrderByDescending(y => y.GetName().Version).First()) 129 .ToList(); 125 130 assemblies.Add(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly); // for dlr functionality 126 131 return assemblies;
Note: See TracChangeset
for help on using the changeset viewer.