title: Could not load file or assembly 'Oracle.DataAccess' 11gR2 VS 2008
body: <p>I Have a Windows 7x64 machine with oracle 11gR2 client installed. I was able to run my c# apps (in ASP .Net Development Server not IIS) which connected to oracle using 'Oracle.DataAccess' until i had to reinstall my VS. Now i get a error </p>
  
  <blockquote>
    <p>Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.</p>
  </blockquote>
  
  <p>I tried reinstalling oracle and VS again but still have the problem. When i run gacutil it says</p>
  
  <blockquote>
    <p>The Global Assembly Cache contains the following assemblies:
      Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f4
    29c47342, processorArchitecture=AMD64</p>
  </blockquote>
  
  <p>fuslow gives the following output</p>
  
  <blockquote>
    <p>Assembly Binder Log Entry  (30/11/2012 @ 12:49:44 PM)<br>
    The operation was successful.
    Bind result: hr = 0x0. The operation completed successfully.<br>
    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Running under executable  C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.exe
    --- A detailed error log follows.<br>
    Pre-bind state information 
    LOG: User = KANISHKA\Administrator<br>
    LOG: DisplayName = Oracle.DataAccess
     (Partial)<br>
    LOG: Appbase = file:///D:/Visual Studio Projects/CSharp Projects/Web/eReconciliation Statements/01 - Trunk/eReconciliationStatements/<br>
    LOG: Initial PrivatePath = D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\bin<br>
    LOG: Dynamic Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a5cf2b76<br>
    LOG: Cache Base = C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a5cf2b76
    LOG: AppName = acd2b7a<br>
    Calling assembly : (Unknown).</p>
    
    <p>LOG: This bind starts in default load context.<br>
    LOG: Using application configuration file: D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\web.config<br>
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.<br>
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).<br>
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/a5cf2b76/acd2b7a/Oracle.DataAccess.DLL.<br>
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/a5cf2b76/acd2b7a/Oracle.DataAccess/Oracle.DataAccess.DLL.<br>
    LOG: Attempting download of new URL file:///D:/Visual Studio Projects/CSharp Projects/Web/eReconciliation Statements/01 - Trunk/eReconciliationStatements/bin/Oracle.DataAccess.DLL.<br>
    LOG: Assembly download was successful. Attempting setup of file: D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\bin\Oracle.DataAccess.dll
    LOG: Entering download cache setup phase.<br>
    LOG: Assembly Name is: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342<br>
    LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.<br>
    LOG: Using application configuration file: D:\Visual Studio Projects\CSharp Projects\Web\eReconciliation Statements\01 - Trunk\eReconciliationStatements\web.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.<br>
    LOG: Post-policy reference: Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342<br>
    LOG: GAC Lookup was unsuccessful.<br>
    WRN: A duplicate assembly was found while copying the assembly item to the cache.<br>
    LOG: Binding succeeds. Returns assembly from C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\a5cf2b76\acd2b7a\assembly\dl3\037e6e93\00d336f9_73c1ca01\Oracle.DataAccess.dll.<br>
    LOG: Assembly is loaded in default load context.</p>
  </blockquote>
  
  <p>It says GAC Lookup was unsuccessful. Could any one pls help me on this issue. I have tried making the project run as x64 too.</p>