title: Oracle.DataAccess.client deployment not working
body: <p>I'm deploying an application that uses an oracle provider with <code>Oracle.DataAccess.dll</code> in a machine that already has a specific version of ODAC <code>64-bit ODAC 11.2</code>.</p>
  
  <p>But the application I want to deploy uses a more recent version of ODAC <code>64-bit ODAC 12.2c</code>. And in the root of that project I have the provider dll and its dependencies :</p>
  
  <ul>
  <li>Oracle.DataAccess.dll</li>
  <li>OraOps12.dll</li>
  <li>oci.dll</li>
  <li>ociw32.dll</li>
  <li>Oracle.DataAccess.dll </li>
  <li>orannzsbb12.dll</li>
  <li>oraocci12.dll</li>
  <li>oraociei12.dll</li>
  </ul>
  
  <p>Once I deploy and run the application, I have the following error :</p>
  
  <blockquote>
    <p>Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)</p>
  </blockquote>
  
  <p>I dont want to update the existing ODAC because it might be used by other applications.</p>
  
  <p>I've checked different links as the following one: <a href="https://stackoverflow.com/questions/33509331/oracle-dataaccess-client-dependencies/33527025#33527025">Oracle.DataAccess.Client Dependencies</a> or this one : <a href="https://stackoverflow.com/questions/9374323/oracle-dataaccess-is-in-the-gac-can-i-control-the-version-i-use#">Oracle.Dataaccess is in the GAC. Can I control the version I use?</a> but it didn't work for me.</p>
  
  <p>Also i though about using Managed drivers, but based on this <a href="https://docs.oracle.com/html/E41125_02/intro004.htm" rel="nofollow noreferrer">link</a>, it doesn't support bulkcopy.</p>
  
  <p>Is there a solution for this issue ? Or is there something I'm doing wrong ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My App.config file looks like this :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
      &lt;system.data&gt;
          &lt;DbProviderFactories&gt;
              &lt;remove invariant="Oracle.DataAccess.Client"&gt;&lt;/remove&gt;
              &lt;add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342"&gt;&lt;/add&gt;
          &lt;/DbProviderFactories&gt;  
      &lt;/system.data&gt;
      &lt;runtime&gt;
          &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
              &lt;dependentAssembly&gt;
                  &lt;assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /&gt;
                  &lt;bindingRedirect oldVersion="0.0.0.0-6.122.1.0" newVersion="4.122.1.0" /&gt;
              &lt;/dependentAssembly&gt;
          &lt;/assemblyBinding&gt;
      &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>