title: The provider is not compatible with the version of Oracle client error when using Oracle.DataClient
body: <p>I'm using Visual Studio 2008 Express Edition, and I'm trying my hand in developing a small application using Oracle.DataClient. 
  I'm getting the above mentioned error, when trying to connect to the database in the target system. </p>
  
  <p>I've added a reference to Oracle ODP.net provider for Oracle 10gR2, and in the target machine I have a copy of Oracle 10gR2 database installed. Despite this, I'm getting the error.
  Before posting this, I read <a href="https://stackoverflow.com/questions/659341/the-provider-is-not-compatible-with-the-version-of-oracle-client">this post</a> at SO, and I have installed the instant client, the error persists.
  Below is the full error stack.</p>
  
  <pre><code>************** Exception Text **************
  System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---&gt; Oracle.DataAccess.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(String connectionString)
     at Employees1.frmLogin.oralogin()
     at Employees1.frmLogin.btnTest_Click(Object sender, EventArgs e)
     at System.Windows.Forms.Control.OnClick(EventArgs e)
     at System.Windows.Forms.Button.OnClick(EventArgs e)
     at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
     at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)
     at System.Windows.Forms.Control.WndProc(Message&amp; m)
     at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)
     at System.Windows.Forms.Button.WndProc(Message&amp; m)
     at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
     at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
     at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  
  
  ************** Loaded Assemblies **************
  mscorlib
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.42 (RTM.050727-4200)
      CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
  ----------------------------------------
  API Data Conversion Assistant
      Assembly Version: 0.0.0.1
      Win32 Version: 0.0.0.1
      CodeBase: file:///C:/Documents%20and%20Settings/3i/My%20Documents/My%20Dropbox/Sathya's%20dropbox/VisualStudio%20Releases/APIDataconversion/Application%20Files/API%20Data%20Conversion%20Assistant_0_0_0_3/API%20Data%20Conversion%20Assistant.exe
  ----------------------------------------
  System.Windows.Forms
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.42 (RTM.050727-4200)
      CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  ----------------------------------------
  System
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.42 (RTM.050727-4200)
      CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
  ----------------------------------------
  System.Drawing
      Assembly Version: 2.0.0.0
      Win32 Version: 2.0.50727.42 (RTM.050727-4200)
      CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  ----------------------------------------
  Oracle.DataAccess
      Assembly Version: 2.102.2.20
      Win32 Version: 2.102.2.20
  </code></pre>
  
  <p>I have Oracle 11g installed on the machine on which I developed the application, and it works fine there, but on the target machine, I'm getting this error. 
  Any inputs will be appreciated.</p>
  
  <p>PS: As mentioned above, the referenced Oracle.DataClient.dll file version corresponds to 10gR2, not 11g.</p>