1

I have Windows 10 machine. In that I am running a c# project which references Oracle.DataAccess.dll. I have installed ODAC112012_32Bit. There is a dll NexFen.FirmLoad which accesses Oracle dll. When I run the project I get following error:

System.TypeInitializationException: The type initializer for 'NexGen.FirmLoad.AppUtils' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.1.2, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) --- End of inner exception stack trace --- at NexGen.FirmLoad.AppUtils..cctor()
--- End of inner exception stack trace --- at NexGen.FirmLoad.LoadFirmware.d__0.MoveNext()

2
  • 1
    Check, if your program is 32-bit (since you are trying to load 32-bit assembly) Commented Apr 6, 2018 at 7:30
  • I have tried with both 32 bit and 64 bit program, but getting the same error. Commented Apr 6, 2018 at 8:35

1 Answer 1

0

Check that your project meets all the following conditions:

  • You have an Oracle client installed (e.g. Oracle Instant Client)
  • Oracle.DataAccess.dll and the Oracle Client and the compile target of your application have all the same architecture (i.e. 32-bit vs. 64-bit)
  • Version of Oracle.DataAccess.dll is the same version as your Oracle client (even the minor version has to match). Your error message indicates version 4.112.3.0 and 4.112.1.2, perhaps there is your problem. Check installed versions in your GAC and Policies.
Sign up to request clarification or add additional context in comments.

2 Comments

I have checked installed version in GAC. In GAC-32 it's 4.112.1.2 and in GAC-64 it was 4.112.3.0 which I have uninstalled as my project was referring to 4.112.1.2 version so.
@kanika, in case you like to use 32-bit and 64-bit have a look at this solution: stackoverflow.com/questions/24104210/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.