- Timestamp:
- 11/25/14 03:26:00 (10 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks
- Property svn:mergeinfo changed
-
branches/OptimizationNetworks/HeuristicLab.Scripting/3.3/Script.cs
r10857 r11576 24 24 using System.CodeDom.Compiler; 25 25 using System.Collections.Generic; 26 using System.Diagnostics; 26 27 using System.Drawing; 27 28 using System.IO; … … 142 143 143 144 public virtual IEnumerable<Assembly> GetAssemblies() { 144 var assemblies = new List<Assembly>(); 145 foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) { 146 try { 147 if (File.Exists(a.Location)) assemblies.Add(a); 148 } catch (NotSupportedException) { 149 // NotSupportedException is thrown while accessing 150 // the Location property of the anonymously hosted 151 // dynamic methods assembly, which is related to 152 // LINQ queries 153 } 154 } 145 var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic && File.Exists(a.Location)).ToList(); 155 146 assemblies.Add(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly); // for dlr functionality 156 147 return assemblies;
Note: See TracChangeset
for help on using the changeset viewer.