IBM Support

Sterling Connect Direct SDK is failing while trying to run sample

Troubleshooting


Problem

I want to run the DoNetSample1 provided by IBM. I added reference to the DLL CDAutoD.dll and ConnectDirectSdk.dll.

Symptom

Error: Could not load file or assembly 'ConnectDirectSdk, Version 4.5.4350.34437, Culture=neutral, PublicKey Token=null' or one of its dependencies.

Cause

Wrong Visual Studio being used and Mismatched DLL's.

Environment

Visual Studio 2010 on Windows 2008 Server

Resolving The Problem

SDK 4.6.0 is build with VS2008 and thus depends on the VS2008 run-time libraries. VS2010 does not include them.

Change any of the sample's project settings, like the Target .NET Framework? It should be 2.0.

You mentioned that you added reference to the DLL CDAutoD.dll and ConnectDirectSdk.dll. This should not be needed. The DotNetSample1 project already comes with a reference to ConnectDirectSdk and should be ready to build.Moreover the sample does not use CDAuto. Please remove CDAutoD.dll again.

If you cannot use VS2008 to build the sample, you may try this:


(1) Download and install the latest VC2008 run-time libraries from Microsoft:

Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update
http://www.microsoft.com/en-us/download/details.aspx?id=26368

When choosing the download file, make sure you select vcredist_x86.exe. Do not select any of the *64.exe files.

(2) Note that the download does not include any debug DLLs. Microsoft only includes them in the full version of VS2008.
So you will have to build and run the sample in Release instead of Debug mode.

(3) If the error persists, use Dependency Walker to verify missing dependencies.

[{"Product":{"code":"SSRRVY","label":"IBM Sterling Connect:Direct for Microsoft Windows"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"4.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
24 July 2020

UID

swg21683958