我有一个用于连接到 oracle db的.NET winforms
应用程序。ODP
ODP 安装是 32 位的,我正在开发应用程序Win 7 64 bit machine
。我在开发机器上将平台目标设置为 x86,它运行正常。但是当我在Win Server 2003 64 bit machine
它上面测试应用程序时出现了异常
The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception.
UNHANDLED EXCEPTION STACK TRACE:at Oracle.DataAccess.Client.OracleCommand.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize()
UNHANDLED EXCEPTION SOURCE: Oracle.DataAccess
UNHANDLED EXCEPTION INNER EXCEPTION: Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client at Oracle.DataAccess.Client.OracleInit.Initialize()
at Oracle.DataAccess.Client.OracleCommand..cctor()
UNHANDLED EXCEPTION DATA: System.Collections.ListDictionaryInternal
UNHANDLED EXCEPTION MESSAGE: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception.
当我将平台目标设置为Any CPU
Windows 7 64 位时,它给出了异常:
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.
开发机(Win 7 64位)11.2.0
上的ODP版本是,测试机上(Win Server 2003 64位)也是11.2.0
我应该怎么做才能在两台机器上运行应用程序?任何想法?