Oracle .NET and error The provider is not compatible with the version of Oracle client

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/ on line 274
0 like 0 dislike
On the developer's machine is VS2010 and Oracle Developer Tools. On test only .net framework.
Library Oracle.DataAccess.dll of ODT added to the references and copied along with the compiled application on a test machine. If the library does not copy, is expected exasan:

System.IO.FileLoadException: Could not load file or assembl
y Oracle.DataAccess, Version=, Culture=neutral, PublicKeyToken=89b483f
429c47342' or one of its dependencies. The located assembly''s manifest definitio
n does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at ConsoleApplication1.Program.Main(String[] args)

But when you copy Oracle.DataAccess.dll in the application folder there is another error:

System.TypeInitializationException: The type initializer fo
r Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> Oracle.Da
taAccess.Client.OracleException: The provider is not compatible with the version
of Oracle client
at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleConnection..cctor()
--- End of inner exception stack trace ---
at Oracle.DataAccess.Client.OracleConnection..ctor()
at Test.Program.Main(String[] args)

Yes, if installed on client machine Oracle client from the ODT, then it works, but I would not want to increase the size distribution at ~300Mb.
How to solve the problem without installing additional software?
by | 29 views

2 Answers

0 like 0 dislike
One Oracle.DataAccess.dll not enough, there need more and more DLLs from Here it is well described:
0 like 0 dislike
Add the Assembly to GAC (using the utility gacutil.exe)

Related questions

110,608 questions
257,186 answers
23,011 users