更新时间: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 :
检查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.