1

I've been trying to import two C # .dll using IronPython. One is called m1.sdk.dll the other is called m1.sdk.something.dll. But I got error. The error message says it could not find a type in m1.sdk.something.dll.

But they are loaded through clr.AddReferenceToFileAndPath () and import of IronPython. I see them carried through clr.References

Is there a way to load these .dll's so despite the name dotted IronPython see how the same module?

import clr

clr.AddReferenceToFileAndPath("c:\\path_to_file_\\m1.sdk.dll")
clr.AddReferenceToFileAndPath("c:\\path_to_file_\\m1.sdk.something.dll")

import m1.sdk
import m1.sdk.something     # The error occurs here

*Traceback (most recent call last):

File "", line 1, in

ImportError: No module named something*

enter image description here

1 Answers1

0

The problem you are facing is most likely not related to the name or similarity of the two referenced assemblies. No module named something will occur if there are no public/visible types found withing the namespace m1.sdk.something.

Simon Opelt
  • 6,136
  • 2
  • 35
  • 66