Oracle ODAC / ODP 12c Uninstall

A few months ago when I reimaged my machine, I installed Oracle 12c with the latest ODP/ODAC.  It worked great, but only one pluggable database is supported for development.  I decided to uninstall and go back to 12g along with ODAC and ODP.  All worked smoothly, until I tried to connect to Oracle database. Then I got an error that data provider for entity framework could not be loaded – – “Failed to find or load the registered .Net Framework Data Provider”.  I double-checked machine.config, both 32 and 64 bit versions.  I checked GAC, and it looked OK there as well.  I actually uninstalled everything from GAC and re-installed Oracle.DataAccess.dll for both 32 and 64 bit versions.  Still, the same error!!! I spent literally 5 hours, trying different things, and I could not see what I was doing wrong.  Finally when I copied the Oracle.DataAccess.dll  into bin folder, I got somewhat descriptive error that Oracle.DataAccess.dll  for version 1.121 could not be loaded.  I checked, and 12g release 5 of ODAC is version 4.112.  Version 4.121 is the release for 12c.  Why is .NET trying to load that?

Finally, I performed file search from Visual Studio in c:windowsmicrosoft.net, and what do you know, I found a config file that 12c installer put in with binding redirect to version 4.121!  I was so mad.  Why on earth would Oracle installer do this?

I hope this helps another poor soul.

Enjoy.