Could not load file or assembly 'Oracle.DataAc

2019-01-26 06:32发布

I am building ASP.NET application with C# and I want to connect to oracle database.
I have added reference to Oracle.DataAccess in my application on my 64bit Microsoft Window Server 2008 machine. I also installed ODAC (Oracle Data Access Component) on my machine and Oracle.DataAccess.dll is also present on this path

C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess

but when i'm trying to connect i encounter following error:

Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

7条回答
贼婆χ
2楼-- · 2019-01-26 07:29

You need to install both x64 and x86 versions of Oracle, because something (I think it was Visual Studio) uses the x86 version when debugging.

查看更多
登录 后发表回答