Oracle Data Provider for .NET Versioning Scheme

Oracle Data Provider for .NET, Unmanaged Driver; ODP.NET, Managed Driver; and ODP.NET Core each ship with their own set of binaries.

For example, 21c binaries would be the following:

  • ODP.NET for .NET Framework 4

    • Oracle.DataAccess.dll

      • Built with .NET Framework 4

      • Assembly version number: 4.x.x.x

    • OraOps21.dll and Oracle Client

      • Used by ODP.NET for .NET Framework

ODP.NET, Managed Driver follows a similar version model for its binaries.

ODP.NET for .NET Framework 4:

  • Oracle.ManagedDataAccess.dll

    • Built with .NET Framework 4

    • Assembly version number: 4.x.x.x

ODP.NET Core for .NET (Core):

  • Oracle.ManagedDataAccess.dll

    • Built with .NET (Core) version

    • Assembly version number: 2.x.x.x

The convention for managed and unmanaged ODP.NET assembly/DLL product versioning is

n1.o1o2.o3.o4.o5

where

  • n1 is the most significant .NET Framework version number.

  • o1o2 once represented the first two digits of the ODP.NET 12.2 version number. It remains "122" as modifying this version would not allow in place ODP.NET upgrades without an application rebuild.

  • o3 is the first digit of the ODP.NET product version number.

  • o4 indicates whether the release is a production version (1) or beta/pre-release version (0).

  • o5 is the ODP.NET assembly build date.

For example, if the ODP.NET version number is 19.10, the corresponding managed and unmanaged ODP.NET assembly product version is 4.122.19.1.20201106.

For ODP.NET Core, the convention is:

n1.o1o2.o3.o4.o5

  • n1 is the minimum .NET (Core) version number that this ODP.NET Core version supports.

  • o1o2 are the minor version(s) of .NET (Core) that this ODP.NET Core version supports.

  • o3 is the first digit of the ODP.NET product version number.

  • o4 indicates whether the release is a production version (1) or beta/pre-release version (0).

  • o5 is the ODP.NET assembly build date.

For example, if the ODP.NET Core version number is 19.10, the corresponding assembly product version is 2.0.19.1.20201106.

The ODP.NET assembly version is distinct from the assembly product version. The assembly version uses four sets of digits and the assembly product version uses five sets of digits. For each ODP.NET release, the first four sets of digits of the assembly version and the assembly product version will be the same. For example, if the ODP.NET Core assembly product version is 2.0.19.1.20201106, then its assembly version is 2.0.19.1. In the case of managed and unmanaged ODP.NET 4.122.19.1.20201106, the assembly version is 4.122.19.1.

The assembly product version identifies the precise ODP.NET version used. Since there are multiple updates Oracle ships within a major release family, you would provide the ODP.NET assembly product version in a support context.

The assembly version is used in more .NET-specific contexts. For example, the <version> section of the .NET configuration file uses the four digit assembly version to identify which ODP.NET version to use.

The assembly product version number can be found in the ODP.NET DLL “Product version” property on Windows. The assembly version can be found in the ODP.NET DLL "File version" property on Windows.

Note that the Oracle installer and documentation still refer to the ODP.NET product version number and not the assembly/DLL version number.

Publisher Policy DLL is provided as before so that applications built with older versions of ODP.NET are redirected to the newer ODP.NET assembly, even though the versioning scheme has changed.

ODP.NET, Managed Driver Versioning

Starting with ODAC 12c Release 2, the ODP.NET, Managed Driver uses assembly manifest attribute AssemblyInformationalVersionAttribute to uniquely identify assemblies with the same AssemblyVersionAttribute attribute value. This value can be accessed via .NET code, PowerShell, and other Windows applications to identify ODP.NET, Managed Driver versions uniquely.

AssemblyInformationalVersionAttribute is set to the same version as the actual .NET assembly version, except the fourth digit, which will no longer be 0. Instead, the version will be unique for each ODP.NET, Managed Driver release by incrementing the fourth digit for every subsequent release.

This value is accessible using .NET Framework System.Diagnostics.FileVersionInfo.ProductVersion property. The returned value can be used as a Version object or as a comparison String using comparison operators or methods. Essentially, among a collection of ODP.NET, Managed Driver assemblies that have the same assembly version, the newest ODP.NET, Managed Driver assembly will have the largest fourth digit ProductVersion value than an older assembly.

PowerShell Example: In this example, administrators uniquely distinguish the assemblies between ODP.NET, Managed Driver versions from an old version of ODP.NET, Managed Driver in c:\old and a more recent one in c:\new.

Script:

$VC1 = New-Object System.Version((Get-Command C:\old\Oracle.ManagedDataAccess.dll).FileVersionInfo.ProductVersion)
$VC2 = New-Object System.Version((Get-Command C:\new\Oracle.ManagedDataAccess.dll).FileVersionInfo.ProductVersion)
"Compare V1 to V2: " + $VC1.CompareTo($VC2)
"Compare V1 to V1: " + $VC1.CompareTo($VC1)
"Compare V2 to V1: " + $VC2.CompareTo($VC1)

Output:

Compare V1 to V2: -1
Compare V1 to V1: 0
Compare V2 to V1: 1

Note:

ProductVersion property comparisons will provide correct information on which version is more recent than the other only for ODP.NET, Managed Driver released from ODAC 12c Release 2 and later.