I am using Oracle 11G on a Windows Server 2008 R2 Enterprise, the Oracle version:
Oracle Database 11g Enterprise Edition Release 184.108.40.206.0 - 64bit Production
PL/SQL Release 220.127.116.11.0 - Production
CORE 18.104.22.168.0 Production
TNS for 64-bit Windows: Version 22.214.171.124.0 - Production
NLSRTL Version 126.96.36.199.0 - Production
On another machine with Visual Studio 2010 and Windows Server 2012 x64, I have installed the ODAC112012.
I could succesfully deploy the new .dll on the Oracle machine, but while I am trying to run the function I am getting the exception: ORA-20100: System.BadImageFormatException. The format of the file is invalid.
After investigation I found Oracle troubleshooting entry: ORA-20100: System.BadImageFormatException. The format of the file is invalid. Cause: The .NET Assembly is not in the proper format. Action: Fix the .NET assembly format that contains the .NET stored procedures or functions. You need to recompile the .NET assembly.
Can anybody explain what does it mean to change the format of the assembly or any suggestion on this issue?
I know nothing about .net stored procedures, which is what it looks like you're trying to do. That said, the most common cause of this error is the bit-ness of the thing you're compiling not matching that of Oracle. If you're deploying to an x64 server, you might want to set the project's build properties to x64 to ensure that's what you get. (The ODAC version with the developer tools is 32 bit, so you may also need a 64 bit Oracle client on your development system to get things working, but as I said I've never done anything with .net stored procedures so I'm kind of guessing there.)