I am trying to do a Windows app and connect to an Oracle database. For now, this is all I am trying to do. When I test this from development server (Windows 2003 Server) it works fine. I copy the content of "output" folder (where the .exe file is in) to my local machine (Windows 7) and try to run the same app and get errors. Same thing happens when I copy the code to another server running Windows 2003. The error I get is: "Could not load file or assembly 'Oracle.DataAccess, Version 2.112.3.0, culture=neutral, Public Key Token=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Since there is no Oracle.DataAccess.DLL file on either my local machine or on the server where the test failed, I thought maybe I can copy the DLL to Windows application's output folder, add a reference to this DLL and compile. But that was not the solution.
Is there any way I can fix this without expecting every machine this application (eventually, a Windows Service) is running from to have Oracle.DataAccess.DLL in GAC? Do I have to install ODAC on all the machines this application will running from (something like couple of hundred servers)?