Love to code, although it bugs me.

Could not load file or assembly Oracle.DataAccess Error

No comments
Assigned with the task of updating a .NET application to use the most recent framework (4.0) and Oracle driver (ODP.NET) I was confronted with the following error at runtime:
Could not load file or assembly Oracle.DataAccess Error

After reading Mark Williams answer on this thread, the solution was to simply to check what scenario my development machine fitted on:

  1. 32-bit ODP.NET installed on 64-bit o/s

  2. .NET application compiled with either "Any CPU" or "x64" set for the "Platform target"

  3. The application is then deployed to the 64-bit host with the 32-bit ODP.NET installed

  4. The application executes as a 64-bit application but tries to load the 32-bit ODP.NET, thus the exception


My scenario was none of the above, but an additional one:

  • 64-bit ODP.NET with the "Any CPU" set for the "Platform target".


As soon as I selected "x64" for the platform target, all performed successfully:



HTH you all.

No comments :

Post a Comment