2

In my application, i'm connecting to an Oracle DB via ODP. I was using .NET 4.5 and everything was working fine but then for Windows XP compatibility i changed framework to .NET 4.0 on all the projects on my solution. Application is built on .NET 4.0 succesfully but can not connect to DB via ODP and throws exception:

Could not load file or assembly 'Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I had created a References folder in Solution folder(near projects) and adding the Oracle.DataAccess.dll file as reference from there to the projects those use it. May it be the problem?

2
  • i guess require version is not the same for 4.5 and 4.0? Commented Jun 19, 2013 at 11:47
  • Actually i get the dll from ODAC tools installation folder, did not separately download it. I don't think it's a version incompatibility. Commented Jun 19, 2013 at 11:52

1 Answer 1

1

In the main(winforms) project of the solution i changed the platform target from any CPU to x86 and now it's working on .NET 4.0.

Sign up to request clarification or add additional context in comments.

Comments

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.