问题描述
几个月前,我的一位同事使用XCOPY在服务器上安装了ODAC 11.106.21,然后他开发了许多可以毫无问题地使用此客户端的应用程序(在测试和生产Windows服务器中).
Some months ago, a colleague of mine installed ODAC 11.106.21 in a server using XCOPY and then he developed many applications that use this client without problems (in test and production windows servers).
上周,我在ODAC 11.1.07.20下开发了一个应用程序.当我要求他使用XCOPY在另一个文件夹中安装这些新的ODAC版本,然后将我的应用程序包含在测试服务器中时,他回答我应该使用ODAC 11.106.21,因为他可能会遇到应用程序问题.
Past week, I developed an application under ODAC 11.1.07.20. When I asked him to install these new ODAC version using XCOPY in a different folder and then include my application in the test server, he answered me that I should use ODAC 11.106.21 because he could have troubles with his applications.
所以我想知道:
1)如果在一台服务器上确实有可能具有两个不同的ODAC版本.
1) If it is really possible to have two different ODAC versions in one server.
2)如果答案是肯定的,我如何才能向同事坚定地保证他的申请不会遇到麻烦?
2) If the answer is positive, how can I firmly ensure to my colleague that he will not have troubles with his applications?
3)如果答案是肯定的,那么是否有必要在服务器中进行某种配置?
3) If the answer is positive, is this necessary to do some kind of configuration in the server?
谢谢!
推荐答案
您可以在同一台计算机上使用多个版本的ODAC,但是对于每个应用程序将使用哪个版本,有几件事情要注意.这实际上适用于所有程序集.
You can have multiple versions of ODAC on the same machine, but there are several things to be aware of with regards to which version will be used by each application. This actually applies to all assemblies.
- 在Visual Studio中,如果在Oracle.DataAccess.dll上将特定版本"设置为"True",则该应用程序将不使用任何其他版本,并且必须能够找到针对其构建的版本.
- 是将DLL与应用程序一起部署还是期望将其放置在特定位置或GAC中.
- 有一个用于查找依赖DLL的特定搜索顺序,并且涉及很多,因此请阅读此MSDN主题.
简短的回答是,有两种简单的方法可确保您的应用程序使用您想要的确切版本的Oracle.DataAccess.dll(这适用于默认情况下的大多数情况):
The short answer is that there are two easy ways to make sure your application uses the exact version of Oracle.DataAccess.dll you want it to (this applies in most cases where everything else is default):
- 将特定版本"设置为True;
- 将DLL与您的应用程序一起部署并驻留在应用程序目录中,或者确保DLL在GAC中.
在您的特定情况下,您的同事可能会担心:如果当前安装的他的应用程序正在从GAC中获取Oracle.DataAccess.dll,而他没有将特定版本"设置为True,则在安装时新的ODAC,他的应用程序将开始使用它(我假设新的Oracle.DataAccess.dll也将安装在GAC中),
In your specific case, your colleague may have a valid concern: If his applications which are currently installed are getting Oracle.DataAccess.dll from the GAC, and he didn't set Specific Version to True, then when you install the new ODAC, his applications will start using it (I'm assuming the new Oracle.DataAccess.dll will be installed in the GAC too),
这篇关于同一台服务器上有两个ODP.NET(ODAC)版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!