Issue upgrading to Oracle.ManagedDataAccess.Core 2.19.100
See original GitHub issueHi, I upgraded the Oracle.ManagedDataAccess.Core package from 2.19.70 to 2.19.100 in my AspNet Core application (.NET Core 3.1) and I encounter this issue:
Error Message:
System.TypeInitializationException : The type initializer for ‘OracleInternal.Network.AddressResolution’ threw an exception.
---- System.IO.FileNotFoundException : Could not load file or assembly ‘System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The system cannot find the file specified.
Stack Trace:
at OracleInternal.ConnectionPool.PoolManager3.CreateNewPR(Int32 reqCount, Boolean bForPoolPopulation, ConnectionString csWithDiffOrNewPwd, OracleConnection connRefForCriteria, String instanceName, List
1 switchFailedInstNames)
at OracleInternal.ConnectionPool.OracleConnectionDispenser3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria) at OracleInternal.ConnectionPool.PoolManager
3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, OracleConnection connRefForCriteria, String affinityInstanceName, Boolean bForceMatch)
at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, OracleConnection connRefForCriteria)
at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
— End of stack trace from previous location where exception was thrown —
…
----- Inner Stack Trace -----
at OracleInternal.Network.LDAP…ctor()
at OracleInternal.Network.AddressResolution…cctor()
From what I’ve seen on Nuget it doesn’t have System.DirectoryServices.Protocols as a dependency, however, when inspecting the DLL, it looks like the package has references to System.DirectoryServices.Protocols:
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
@hiezust It’s an idea, though I don’t believe any other ADO.NET data provider does this, not even Microsoft’s own providers.
How Microsoft decides to break up the .NET Runtime into separate packages does not have hard and fast rules. It could change from release to release based on what MS views as the most commonly used packages.
I’d argue this issue was not properly resolved.