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=22.214.171.124, 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
--- End of inner exception stack trace ---
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?