1 Reply Latest reply on Aug 8, 2013 10:07 PM by gdarling - oracle

    Visual Studio 2010 and ODP.net 64bit Type or namespace name Oracle could not be found

    4d3d3c37-95f2-4d22-9c93-2545a40ace08

      Here is our environment Visual Studio 2010 downloaded and Installed of ODAC: 64-bit ODAC 11.2 Release 5 (11.2.0.3.20) for Windows x64. ODAC1120320_x64.zip We installed ODAC and SQL Developer. Using SQL developer and sql plus we are able to connect to ORACLE database in the server. Framework: 3.5 Target: x64 compile to x64 IIS: Defaultapppool 32 bit enabled false

      We added reference Oracle.Dataaccess.dll. After that in code we have Using Oracle.Dataaccess.Client. After this we build the project. No error. When we try to run this we get Visual Studio 2010\Projects\NewASP\NewASP\Default.aspx.cs(2,7): error CS0246: The type or namespace name 'Oracle' could not be found (are you missing a using directive or an assembly reference?)

      We also copied these dlls to bin folder oci.dll orannzsbb11.dll oraocci11.dll oraops11.dll

      But no luck. We made sure ORACLE_HOME is set to C:\app[user]\product\11.2.0\client_1 We have also set path: C:\app[user]\product\11.2.0\client_1\odp.net\bin\2.x; C:\app[user]\product\11.2.0\client_1;C:\app[user]\product\11.2.0\client_1\bin

      used corflags to check the version of Oracle.DataAccess.dll 32+. It is 64bit

      Compile Error: C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\43be1703\e4b54300\App_Web_q_hvwy1n.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\43be1703\e4b54300\App_Web_q_hvwy1n.0.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\43be1703\e4b54300\App_Web_q_hvwy1n.1.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\43be1703\e4b54300\App_Web_q_hvwy1n.2.cs"

      We are able to connect and retrieve data from console and winform application. This is happening only in ASP.net. Both framework 3.5 and 4.0.

      I am struggling with this for a while now. Can you help?