error executing exe file built using dotnet

46 Views Asked by At

i have two exe files sent by another team member. It is built using c# kode. One oracledataaccess dll file was also sent. (since the exe connects with oracle )-

When i try to execute the 32 bit ,

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.

when i try to execute 64 bit, i get

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

this is driving me nuts. i have installed oracle odac and oracle client. Any thoughts ? i have zero knowledge in dotnet. my system is windows 64 bits.

1

There are 1 best solutions below

0
MrTea On

hard to trouble shoot based on this info but with ODP you'll likely need to have your tnsnames.ora file in (for e.g 12.2) C:\oracle\product\12.2.0\client_1\Network\Admin , C:\oracle\product\12.2.0\client_1\bin , C:\oracle\product\12.2.0\client_1\odp.net\bin\4 . Add it there and restart and I hope you'll have some luck. cheers, Dave