I have a C# source written by someone else, it has two configurations: Release and Debug both target Any CPU.
When I launch Release everything is great. When I launch under Debug I get:
System.InvalidOperationException: The 'OraOLEDB.Oracle.1' provider is not registered on the local machine.
All the things I tried:
I installed the 64bit 11.2 Oracle driver administrator package with all default settings.
The oracle bin folder is setup in my path.
All users have correct security permissions for the oracle folder.
I can run tnsping and other commands just fine from a cmd prompt.
The regsvr32 OraOLEDB11.dll was run successfully.
For some reason, it works if I target specifically x64 in debug mode. Why does it look for an x86 driver when run under Any CPU? Again it works fine under Release in Any CPU.