8000 Use the assembly short name to find the embedded Python.Runtime (othe… · pythonnet/pythonnet@dfdcfe7 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit dfdcfe7

Browse files
committed
Use the assembly short name to find the embedded Python.Runtime (other assemblies may reference it with the full name).
1 parent 2b11631 commit dfdcfe7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pythonnet/src/console/pythonconsole.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public AssemblyLoader() {
4141
loadedAssemblies = new Dictionary<string, Assembly>();
4242

4343
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
44-
String resourceName = new AssemblyName(args.Name).Name + ".dll";
44+
string shortName = args.Name.Split(',')[0];
45+
String resourceName = shortName + ".dll";
4546

4647
if (loadedAssemblies.ContainsKey(resourceName)) {
4748
return loadedAssemblies[resourceName];

0 commit comments

Comments
 (0)
0