Devart.Data.Oracle.OracleProviderException : 'Unable to load ...oci.dll.

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
GaultierLarge
Posts: 7
Joined: Thu 24 Jan 2019 12:28

Devart.Data.Oracle.OracleProviderException : 'Unable to load ...oci.dll.

Post by GaultierLarge » Thu 24 Jan 2019 12:35

Hello,

I'm using the last version of the Devart.Data.Oracle.EFCore 9.6.675.

And when i want to acces to my database, i have this error :

Code: Select all

Devart.Data.Oracle.OracleProviderException : 'Unable to load C:\oracle\product\12.1.0\client_64\bin\oci.dll. Please check that you use 64x version of Oracle client with 64x application.'
BadImageFormatException : Tentative de chargement d’un programme de format incorrect. (Exception from HRESULT: 0x8007000B)

I run my application in 64x version and i have the X64 client install on my computer

I don't understand what I have to do for solve this error

Thanks for your help

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Devart.Data.Oracle.OracleProviderException : 'Unable to load ...oci.dll.

Post by Shalex » Tue 29 Jan 2019 16:21

1. Please check workability of your Oracle Client. For example: can you connect with SQL*Plus or Oracle SQL Developer using the same Oracle Client?

2. Make sure that:
a) Platform target=x64 in the properties of your project
b) your Oracle Client is located in the registry branch
HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\
instead of
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE\

3. Specify:
a) the Target framework property of your project
b) you are using .NET Standard Devart.* assemblies loaded from https://www.nuget.org/packages/devart.d ... cle.efcore, aren't you?

As a workaround, please connect in the Direct mode.

GaultierLarge
Posts: 7
Joined: Thu 24 Jan 2019 12:28

Re: Devart.Data.Oracle.OracleProviderException : 'Unable to load ...oci.dll.

Post by GaultierLarge » Wed 30 Jan 2019 09:23

Thanks for your anwser, next, my anwser to your questions
1. Please check workability of your Oracle Client. For example: can you connect with SQL*Plus or Oracle SQL Developer using the same Oracle Client?
I tried with SQL Developper and it's OK
2. Make sure that:
a) Platform target=x64 in the properties of your project
=> It's OK, I target the X64 plateform
b) your Oracle Client is located in the registry branch
HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\
instead of
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE\
=> It's OK, and in the error message, there is the path of the x64 client, it's why I don't understand this error
3. Specify:
a) the Target framework property of your project
.net core 2.2
b) you are using .NET Standard Devart.* assemblies loaded from https://www.nuget.org/packages/devart.d ... cle.efcore, aren't you?
Yes we use this package
As a workaround, please connect in the Direct mode.
Direct Mode is Working thx :)

Post Reply