title: Runtime Error on connecting Oracle 10g using Oracle.DataAccess.Client
body: <p>I can run my program successfully in the development machine, however, I found that the users encountered the runtime error when starting to connect oracle DB. Indeed, I added the references but the debugger said that "the provider is not compatible with the version of Oracle client", </p>
  
  <p>Development Environment
  - C# WinForm
  - .Net Framework 4.5
  - Oracle 10g Database</p>
  
  <p>please help! Thanks!</p>
  
  <pre><code>See the end of this message for details on invoking 
  just-in-time (JIT) debugging instead of this dialog box.
  
  ************** 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 TradeImport.Classes.Adapters.PLSqlAdapter.getConnection()
     at TradeImport.ImportBond5YEVForm.btnConnect_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: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
  ----------------------------------------
  Importer
      Assembly Version: 1.0.0.0
      Win32 Version: 1.0.0.0
      CodeBase: file:///C:/Users/ccho/AppData/Local/Apps/2.0/ERG0T4E0.6M4/LQHVKBQJ.17D/etci..tion_93b81ee98636ebca_0001.0000_9ccdf984ecfcdfd0/Importer.exe
  ----------------------------------------
  System.Windows.Forms
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  ----------------------------------------
  System.Drawing
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  ----------------------------------------
  System
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
  ----------------------------------------
  System.Configuration
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  ----------------------------------------
  System.Xml
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
  ----------------------------------------
  Oracle.DataAccess
      Assembly Version: 1.102.2.20
      Win32 Version: 1.102.2.20
      CodeBase: file:///C:/Windows/assembly/GAC/Oracle.DataAccess/1.102.2.20__89b483f429c47342/Oracle.DataAccess.dll
  ----------------------------------------
  System.Data
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
  ----------------------------------------
  System.Core
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
  ----------------------------------------
  </code></pre>