I have downloaded 64 bit Ncache application as i have 64 bit windows 7. I am creating a sample application using Ncache. The samples that come with Ncache runs perfectly fine. I am developing my own app using Ncache local cache. When i run that app throuhg Visual Studio 2010 i am getting the following error:

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.

I installed latest version of oracle as well. The sample apps which Ncache provides are made in Visual Studio 2008 and i run them in Visual Studio 2010 after converting them. Oracle.DataAccess.dll that came with Ncache has version 2.112.1.0 and one that came with NCache has version 2.121.1.0. I am stuck on this for couple of days.

1

There are 1 answers

0
Dhiraj Goplani On BEST ANSWER

The solution to this problem turned out to be very simple. Ncache.web internally uses Web dll. I removed the reference of the one which came with the Ncache and had to add a reference of Oracle.DataAccess.dll from 'assembly\GAC_64' as i was using .Net 4.0 and it was referencing 2.0 dll from 'C:\Windows\assembly' in case i don't add the reference of the one that comes with Ncache.