Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkkirschner committed Feb 27, 2024
1 parent 31ba8f1 commit f1723e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/NodeServices/PythonServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ internal static readonly Lazy<PythonEngineManager>
/// </summary>
private PythonEngineManager()
{
dotNetRuntimePaths = Directory.GetFiles(RuntimeEnvironment.GetRuntimeDirectory(), "*.dll");
dynCorePaths = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.GetFiles("*.dll", SearchOption.AllDirectories).Select(x => x.FullName);

AvailableEngines = new ObservableCollection<PythonEngine>();

// We check only for the default python engine because it is the only one loaded by static references.
Expand All @@ -170,8 +173,6 @@ private PythonEngineManager()
FirstOrDefault(a => a != null && a.GetName().Name == CPythonAssemblyName));

AppDomain.CurrentDomain.AssemblyLoad += new AssemblyLoadEventHandler((object sender, AssemblyLoadEventArgs args) => LoadDefaultPythonEngine(args.LoadedAssembly));
dotNetRuntimePaths = Directory.GetFiles(RuntimeEnvironment.GetRuntimeDirectory(), "*.dll");
dynCorePaths = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.GetFiles("*.dll", SearchOption.AllDirectories).Select(x => x.FullName);
}

private void LoadDefaultPythonEngine(Assembly a)
Expand Down

0 comments on commit f1723e0

Please sign in to comment.