lost - multiple ODP.NET versions, policy files...which version being used?
979561Dec 12 2012 — edited Dec 13 2012I've been using Oracle ODP.NET for a while without really understanding the policy files and how they determine what version is actually being used by the application. This target framework for this application 3.5. My machine has gone through some gyrations with installs of an Oracle Client, ODAC, ODT...
My development box is Windows 7 - on my start menu under Oracle I have these listed, along with some components that I got from the Oracle Universal Installer
* Oracle - Odac11g_home1 - ODAC for Oracle Client 11.1.0.6.21, ODP for .NET 2.0 11.1.0.6.20, Oracle Instant Client 11.1.0.6.0
* Oracle - Odac11g_home2 - ODAC for Oracle Client 11.1.0.7.20, ODP for .NET 2.0 11.1.0.7.20, Oracle Instant Client 11.1.0.7.0
* Oracle - OraClient11g_home1 - Oracle Client 11.2.0.1.0 containing ODP for .NET 11.2.0.1.0
On my C: drive I have these Oracle folders listed:
C:\Oracle\Ora11gR2\Base\Home\ODP.NET\bin\2.x
C:\Oracle\product\11.1.0\client_1\odp.net\bin\1.x\Oracle.DataAccess.dll
C:\Oracle\product\11.1.0\client_1\odp.net\bin\2.x\Oracle.DataAccess.dll
C:\Oracle\product\11.1.0\client_2\odp.net\bin\2.x\Oracle.DataAccess.dll
We have a VB.NET project which references an Oracle.DataAccess version (2.111.6.20) under assembly\GAC_32. Just to see what would happen, I deleted that reference, and attempted to re-add it - in References I clicked on the .NET tab, and the only Oracle.DataAccess item listed is for 2.111.7.20. I undid my checkouts to get back to where I was.
C:\Windows\assembly
* Oracle.DataAccess 1.111.6.20
* Oracle.DataAccess 2.111.7.20 x86
* Oracle.DataAccess 2.111.6.20 x86
* Oracle.DataAccess 2.112.1.0 AMD64
* Policy.1.102.Oracle.DataAccess 1.111.6.20
* Policy.1.111.Oracle.DataAccess 1.111.6.20
* Policy.10.1.Oracle.DataAccess 1.111.6.20
* Policy.10.2.Oracle.DataAccess 1.111.6.20
* Policy.2.102.Oracle.DataAccess 2.112.1.0
* Policy.2.111.Oracle.DataAccess 2.112.1.0
* Policy.9.2.Oracle.DataAccess 1.111.6.20
machine.config
System.data -- DbProviderFactories -- Oracle.DataAccess.Client Version=2.111.7.20
PATH - includes these in the order listed
C:\Oracle\product\11.1.0\client_2;
C:\Oracle\product\11.1.0\client_2\bin;
c:\oracle\ora11gr2\base\home\bin;
C:\Oracle\product\11.1.0\client_1;
C:\Oracle\product\11.1.0\client_1\bin;
regedit - find "ODP.NET"
-----------------------------------
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ODP.NET\2.112.1.0
• DllPath c:\oracle\ora11gr2\base\home\bin
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net
• (default) C:\Oracle\product\11.1.0\client_2\ODP.NET\bin\2.x\
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\ODP.NET
• Folder 1.111.6.20 DllPath C:\Oracle\product\11.1.0\client_1\bin
• Folder 2.111.6.20 DllPath C:\Oracle\product\11.1.0\client_1\bin
• Folder 2.111.7.20 DllPath C:\Oracle\product\11.1.0\client_2\bin
When I run my app with ODP.NET tracing on, the only clue I see to what version is being used is this in the trace file:
TIME:2012/12/11-12:55:35:614 TID:1880 (REGISTRY) (DllPath : C:\Oracle\product\11.1.0\client_1\bin)
Can anyone help me understand what all this means - what version of ODP.NET (Oracle.DataAccess) is being used and what determines that?
TIA.