Why doesn't ODP.NET 11 xcopy deployment work on a machine with Oracle DB 10 installed? -


I have an app that uses local version of Odac 11 below the directory that is inside the .exe file. The idea is that we want our app to use local ODAC 11, even if the consumer has installed it on its machine.

Oracle.DataAccess.dll is in the same directory as .exe.

This works fine when no Oracle client is installed in the client machine, but I get an error when I started on a machine with Oracle Database 10.2.0.something:

  for typed initializer 'oracle.datxx Client. Oracle Connection 'left the exception. [Stack Trace] Oracle.DataAccess.Client.OracleInit.Initialize () is not compatible with OracleException's version of Oracle Client.OracleConnection..cctor ()  

I think that this is something to do with runtime binding policy, but Google has not found anything useful to discover "Oracle / Odac / Odical .NET Runtime binding policy".

Does anyone know the way to solve this issue?

If this is not a specific issue, someone can look at me what I want to do: Make sure my application uses ODAC 11?

So I understand that this problem was that Oracle.DataAccess.dll was at that time the form of the app In the same directory, it can not get its lower-level homies (OC, et al), so the compatibility error.

It indicates that if you want an application to work with ODAC 11 xcopy deployment, whether the els and the user may have installed it on his machine, you need to do 2 things

  1. Set the PATH environment variable for the process (I was already doing this.)
  2. Set the ORACLE_HOME environment variable for this process (I was not doing this.)

      Environmental .etcetvironmental ("path", environment Current directory + "\\ Oracle \\ 111 \\ Odak;" + environment. The current directory + "\\ Oracle \\ 111 \\ Odak \\ bin;" Pryavarnwraybltabag. Process); Environmental environment environment ("ORACLE_HOME", Environment. Current Directory + "\\ Oracle \\ 11.1 \\ ODAC", Environmental Variety. Process);  Edit:  It is important to keep in mind that Oracle will not only throw this error for the environment but also if the files do not remember on the target machine, despite the environment settings, Error because I had the subversion set to ignore directories called "bin", so the OraOps DLL client was not being copied. 


Comments