且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

开发用于Windows Server 2003 64位的Windows XP 32位

更新时间:2022-06-07 23:21:22

简单的解决办法:你应该根据平台(64一64机)安装Oracle客户端。其原因是,.NET应用程序很可能要建在值为anycpu配置,这意味着它将作为在x64平台上64位应用程序运行。然后,它只能加载64位本机库...

Straightforward solution : you should install the Oracle client according to the platform (x64 on a x64 machine). The reason is that your .NET application is very likely to be built in AnyCPU configuration, which means it will run as a x64 application on a x64 platform. It then can only load x64 native libraries...

请注意,当涉及到Oracle,我喜欢用 Oracle即时客户

Note that when it comes to Oracle, I like to use Oracle Instant Client :

  • 您不必在目标机器(包括开发框!)。安装任何软件
  • 您可以确保您的应用程序将与特定的客户端,你挑(版本,在x86 / x64)上运行。
  • 您甚至可以轻松拥有多个应用程序在同一台计算机上的不同的客户端版本。
  • 作为一个缺点,它增加了一个显著的重量为你的应用程序(19MB〜最小)。

检查What所需的最小客户端资源占用连接C#来Oracle数据库?了解详情。

在您的特定情况下,我建议建立一个Visual Studio项目,将工作在x86以及x64的机器:检查我的博客文章的 Oracle即时客户端在Visual Studio 。那么这里是指导如何进行配置WiX的包Oracle即时客户端的针对x86或x64机器。如果使用其他部署策略,只要确保你根据目标平台出货正确的客户端。

In your particular case, I recommend setting up a Visual Studio project that will work on x86 as well as x64 machines : check my blog post Oracle Instant Client in Visual Studio. Then here is a guidance on how to configure a WiX package for Oracle Instant Client targeting x86 or x64 machines. If you use another deployment strategy, just make sure you ship the correct client according to the target platform.