How do I get python to load .NET .dlls referenced by mixed mode .dlls?
- by Michael Kelley
I have a python .pyd that is a mixed mode C++ DLL. The DLL loads fine and loads unmanaged C++ dlls without a problem, but when it tries to load the .NET dlls referenced by the managed C++ dlls it fails with this error message:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly '...'
Copying these .NET dlls to the directory that pythod_d.exe is contained in allows the .NET libraries to load successfully, but this is not a good long term solution. Is there an environment variable I have to set or some command line option to python_d.exe that will solve my problem?
Note that using IronPython or Python .NET is NOT acceptable.