One after another, I tried the following approaches:
- Installed IBM.Data.DB2 nuget package.
- Removed it and added a reference to
C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin\db2app64.dll
- Added
C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin\
to the systemPATH
- Copied the above DLL to the output folder, with all permutations of bullets ##1 and 2.
- Copied the above DLL to
\Windows\system32
, ditto - Repaired VCRedist 2013 x86 and x64
- Uninstalled and reinstalled VCRedist 2013 x86 and x64
Still, the same error during connection = new DB2Connection(connectionString)
:
System.DllNotFoundException: 'Unable to load DLL 'db2app64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
MSVCR120.dll exists:
C:\Documents and Settings\use0\AppData\Local\Temp\DB2CLI00000\
03/02/25 953480 A msvcr120.dll
C:\Documents and Settings\use0\AppData\Local\Temp\DB2CLI00001\
03/02/25 953480 A msvcr120.dll
C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin\amd64.VC12.CRT\
06/17/20 953480 A msvcr120.dll
C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin\x86.VC12.CRT\
06/17/20 961160 A msvcr120.dll
C:\Program Files\IBM\IBM DATA SERVER DRIVER\msg\en_US\amd64.VC12.CRT\
06/17/20 953480 A msvcr120.dll
C:\Program Files\IBM\IBM DATA SERVER DRIVER\msg\en_US\x86.VC12.CRT\
06/17/20 961160 A msvcr120.dll
C:\Program Files (x86)\Microsoft Visual Studio\Shared\SDKs\Azure\v2.9\bin\plugins\Diagnostics\
10/23/23 963232 A msvcr120.dll
C:\Program Files (x86)\Microsoft Visual Studio\Shared\SDKs\Azure\v2.9\bin\plugins\Diagnostics\Monitor\x64\
10/23/23 963232 A msvcr120.dll
C:\Program Files (x86)\Microsoft Visual Studio\Shared\SDKs\Azure\v2.9\bin\plugins\Diagnostics\Monitor\x64\Extensions\ApplicationInsightsExtension\
10/23/23 963232 A msvcr120.dll
C:\Windows\System32\
07/07/16 963240 A msvcr120.dll
C:\Windows\SysWOW64\
05/24/17 971072 A msvcr120.dll
Out of ideas. Last time I worked with DB2 under Windows 7, and I did not have to do anything other than to install DB2 client and to add IBM.Data.DB2 nuget package. Now, under Windows 10 I am facing this issue. How is it supposed to be resolved?