I think my problem arises because I am successful with loading a .NET assembly, creating an instance and calling methods from a .NET dll. Certain methods, however, call methods from other non.NET dlls. Those methods are not exposed via the sdk I am working with. Here's an example:

    OL490Assembly = LoadNETAssembly["OL490SDKDll.dll"]
    OLLibSDK = NETNew["OL490_SDK_Dll.OL490SdkLibrary"]

This method seems to work: OLLibSDK@GetOL490SerialNumber[] Returns: "NoOL490Found" which is correct since I'm currently not connected to the device.

However, when I call OLLibSDK@ConnectToOL490[0]

I get the following:

NET::netexcptn: "A .NET exception occurred: "System.IO.FileNotFoundException: Could not load file or assembly 'CyLibCpp, Version=1.0.3636.28588, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.\nFile name: 'CyLibCpp, Version=1.0.3636.28588, Culture=neutral, PublicKeyToken=null'\ n at OL490Lib.CmdLib..ctor(Int32 dIndex)\ n at OL490_SDK _Dll.OL490SdkLibrary.ConnectToOL490(Int64 dOL490Index)\ n \ nWRN: Assembly binding logging is turned OFF.\nTo enable assembly bind failure logging, set the registry value [HKLM \ Software \ Microsoft \ Fusion!EnableLog] (DWORD) to 1.\ nNote: There is some performance penalty associated with assembly bind failure logging.\nTo turn this feature off, remove the registry value [HKLM \ Software \ Microsoft \ Fusion!EnableLog]."

It is trying to access CyLibCpp.dll. If I try to load this as a .NET assembly, I get

"A .NET exception occurred: "System.BadImageFormatException: Could \ not load file or assembly 'file:///C:\ WINDOWS \ assembly \ GAC \ \ OL490 \ CyLibCpp.dll' or one of its dependencies. An attempt was \ made to load a program with an incorrect format."

This implies to me that CyLibCpp.dll is not a .NET dll.

Has anyone run into these types of dependency issues and found a resolution?




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.