I reference Oracle.DataAccess.dll in my project. It works fine on my computer. When it is transferred to another colleague’s computer, it no longer works, the error being:
The provider is not compatible with the version of Oracle client
even if the dll is copied into the Application directory. So I compiled it with a different version of the dll, and it still worked on my computer, it now also worked on my colleague’s computer, but didn’t work on the client’s server.
I’ve googled this a lot and all the solutions I’ve found are bad – they involve installing software on the machine – my application needs to work on any machine regardless of what may or may not be installed there. Is there a way to make this work universally?
Edit: It is even acceptable if Oracle client is required to be installed. But it is not acceptable to be version-picky. I can pick whatever version of the DLL I want and use it, I want a version that will always work everywhere. But it doesn’t seem to work that way.
Surprisingly, I never ran into this problem with System.Data.OracleClient, which is very similar.
In addition to managed Oracle.DataAccess.dll, you also need to copy the native OCI DLLs to the application’s dir. The easiest way to obtain these DLLs is through Oracle instant client.
Just be careful to use the right “bitness” (32-bit DLLs for ‘x86’ configuration, 64-bit DLLs for ‘x64’ configuration and whatever bitness matches the target machine for the ‘Any CPU’ configuration).