File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ public partial class Runtime
23
23
{
24
24
static Runtime ( )
25
25
{
26
- var binLocation = typeof ( Runtime ) . GetTypeInfo ( ) . Assembly . Location ;
27
- var interopDllPath = Path . Combine ( Path . GetDirectoryName ( binLocation ) , "Python.Runtime.Interop.dll" ) ;
28
- InitInterop ( interopDllPath ) ;
26
+ InitInterop ( ) ;
29
27
}
30
28
31
29
internal static void InitInterop ( IPythonInterop pythonInterop )
@@ -51,13 +49,11 @@ internal static void InitInterop(IPythonInterop pythonInterop)
51
49
ObjectOffset . Init ( ) ;
52
50
}
53
51
54
- public static void InitInterop ( string interopDllPath )
52
+
53
+ public static void InitInterop ( )
55
54
{
56
- #if NET46
57
- var assembly = Assembly . LoadFrom ( interopDllPath ) ;
58
- #else
59
- var assembly = AssemblyLoadContext . Default . LoadFromAssemblyPath ( interopDllPath ) ;
60
- #endif
55
+ var assembly = Assembly . Load ( new AssemblyName ( "Python.Runtime.Interop" ) ) ;
56
+
61
57
var type = assembly . GetType ( "Python.Runtime.Interop.PythonInterop" ) ;
62
58
var pythonInterop = ( IPythonInterop ) Activator . CreateInstance ( type ) ;
63
59
InitInterop ( pythonInterop ) ;
You can’t perform that action at this time.
0 commit comments