-
Notifications
You must be signed in to change notification settings - Fork 748
Unable to find assembly #468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@JamesMTSloan please follow the advises for troubleshooting in this resolved issue: |
I updated to .NET 4.7 and the error persisted. The output of fuslogvw and ILSPY suggest to me that the DLL was built using .NET 2.0. Does pythonnet require DLLs to be 3.5+? Outputs:
Cheers |
@JamesMTSloan this assembly contains unmanaged code (e.g. C++/CLI), hence cannot redirect at runtime from CLR2 to CLR4. It has to be recompiled to target .NET 4.0+. pythonnet does not work in CLR2 due to usage of dynamic and hashset. |
Thanks very much for your help. It is a third party DLL but perhaps I can make an enquiry anyway. Thanks again. |
Closing, since pythonnet cannot really do anything here |
Related: #2588 |
Environment
Details
I am trying to load a .NET assembly DLL using pythonnet. This has worked fine for other DLLs (.NET 4) but for one in particular I am having issues. This is an assembly provided by the Sapera SDK made by DALSA. I don't know what .NET version this was made using, presumably 4 but I don't know how to check. The docs for it say NET 3.5+ required.
Using the VS dependency checker I have determined that all the required DLLs are on the path (although I had to move MSVCR80.dll and MSVCP80.dll into System32 from an odd location). DependencyWalker shows a couple more that may be missing and suggests that the DLL is 64-bit.
The dependencies that I get from VS are:
corapi.dll, WINMM.dll, KERNEL32.dll, USER32.dll, GDI32.dll, MSVCR80.dll, MSVCP80.dll, msvcm80.dll, mscoree.dll
The following code produces a Traceback:
Is there something I am overlooking? I imagine it can actually find it but is failing to load it for some reason. Thanks for any help you can provide.
The text was updated successfully, but these errors were encountered: