System.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.
System.BadImageFormatException : An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
This is the error I got when running nunit tests in my 64 bit Windows 7 machine.
I had 64 bit VS 2010, 64 bit Oracle installed.
I had nunit plugin for Visual studio, and I could right click on a test project and select “Test with NUnit”, but this was always loading up nunit-86 which is 32 bit version of nunit.
This meant it was loading up 32 Oracle client lib.
So I added nunit/bin dir to my path and loading nunit.exe from bin/debug of the test project dir and ran the dll in 64 bit nunit exe and lo and behold my tests pass!