.net – Running Oracle 11g r1 on Windows 7 x64 getting 64 bit error

64-bitnetoraclevisual studiowindows 7

I have installed Oracle 11g r1 64 bit on Windows 7. I am able to connect to it using Sql Developer and a command line tool written in .Net that is 32 bit. I am using Visual Studio to create an ASP.Net application. The solution has 4 projects all of which are compiling for "Any CPU" I installed the 64 bit version of Oracle client and I keep getting the error below. The project is using the System.Data.OracleClient provider. Everything is 64 bit so I don't know why I am getting the error.

[InvalidOperationException: Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.]

Best Answer

What version of ORacle.DataAccess do you have installed ? Check the GAC:

gacutil /l Oracle.DataAccess

Make sure you have the 64 bit version installed. Also make sure you don't have the 32bit Oracle client on your path before 64 bit client.

I found last week that installing the 32bit Oracle ODP.NET package removes the 64 bit publisher policies...

Related Topic