0

On my development computer I uninstalled oracle client 11.2.0.1 and installed 11.2.0.4. I did this without taking into account that my visual studio references the Oracle.DataAccess object with the old version. When I ran one of my projects I received:

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.

It also gave me a version error as well, but I can't reproduce it.

I found many posts on how to correct this issue and as of now I'm still unable to get it to work. What I would like to know is how did uninstalling and reinstalling different oracle versions cause my issue? I thought I had it set to not be version specific. Doesn't Visual Studio store the dll that it references?

Would uninstalling my oracle client and clearing out an reference to oracle in the GAC and then reinstalling register the new versions in the GAC and then my visual studio application should work?

Thank you

Jerry Warra
  • 304
  • 1
  • 4
  • 20
  • Huh. Perhaps you shouldn't have uninstalled 11.2.0.1, but installed 11.2.0.4 into a new directory so that the old references would still work. So, how about reverting it back? Uninstall 11.2.0.4, install 11.2.0.1 again (and then, if you want, install 11.2.0.4 into a new directory)? – Littlefoot May 16 '18 at 21:01
  • Thanks Littlefoot. I'm currently uninstalling 11.2.0.4 and then I will reinstall 11.2.0.1. I will report back what happens. Thanks – Jerry Warra May 17 '18 at 13:17
  • Would changing to the Managed code version of the oracle dll be a better approach? Thank you – Jerry Warra May 17 '18 at 14:02
  • No idea, sorry. – Littlefoot May 17 '18 at 14:11
  • No problem. I'm still working on getting it to install 11.2.0.1 correctly. It installs but the ODP.NET\Bin doesn't have a "4" directory just "2.x" – Jerry Warra May 17 '18 at 14:13
  • I finally have it working, but I'm not sure why. I installed the old version of the oracle client 11.2.0.1 and referenced that DLL in my VS 2012 project. I run my project and it gives "Could not load file or assembly 'oracle.dataaccess'. When I change it's property to copy local = false and then run my project it works. Before I move this change to production I wanted to see if someone can explain why not copying it local works. Thank you – Jerry Warra May 17 '18 at 19:08

0 Answers0