Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assembly load error for 64 bit .NET Informix ADO.NET provider

I am running 64 bit Windows 7. I have a .NET 4.0 web project and a Class Library Project that accesses an Informix database. I installed the IBM Informix Client SDK version 3.70.FC4 (64 bit version, .NET 2.0 runtime).

Per the IBM Informix .Net Provider Guide

  1. I added the directory %INFORMIXDIR%/bin/netf20/ to the PATH variable

  2. I added a reference to the IBM.Data.Informix.dll (version 3.0.0.2) in the Class Library Project.

When I run the web project I get this error:

Could not load file or assembly 'IBM.Data.Informix' or one of its dependencies.
An attempt was made to load a program with an incorrect format.

Any advice on what to do?

like image 306
Andrew Thomas Avatar asked Nov 05 '22 00:11

Andrew Thomas


1 Answers

My steps to solve:

  1. Choose the IBM.Data.Informix DLL under the list of References and open properties. Set 'Copy Local' = False.
  2. Clean solution and try to build.
like image 137
Sergey Malyutin Avatar answered Nov 11 '22 15:11

Sergey Malyutin