V
V
Vadim Yangunaev2010-10-12 09:54:53
.NET
Vadim Yangunaev, 2010-10-12 09:54:53

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

The developer machine is running VS2010 and Oracle Developer Tools. On the test only .net framework.
The Oracle.DataAccess.dll library from the ODT has been added to the references and is copied along with the compiled application to the test machine. If the library is not copied, the expected exception occurs:

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


But when copying Oracle.DataAccess.dll to the application folder, another error occurs:

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


Yes, if you install the Oracle client from ODT on the client machine, then everything works, but I would not want to increase the size of the distribution by ~ 300Mb.
How can I solve the problem without installing additional software?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel7, 2010-10-13
@Avg00r

One Oracle.DataAccess.dll is not enough, other dlls from odp.net are also needed there. It 's well described here: ora-00001.blogspot.com/2010/01/odpnet-minimal-non-intrusive-install.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question