Hi Everyone.
I am seeking help with ODP.NET. I am hoping to complete this sort of update:
-Imports Oracle.DataAccess.Client
+Imports Oracle.ManagedDataAccess.Client
I am motivated to do this because our VB.NET app is now deployed to hosts that do not have the 32-bit Oracle client installed. Although an upgrade of the 32-bit DLL (Oracle.DataAccess.v18.0.0_x32.dll) to 64-bit may be an option I get the sense that managed .NET (Oracle.ManagedDataAccess.*) is the perferred, more future proof, path.
I updated the source by adding "Managed" to "DataAccess" in all the places it appeared. To the .vbproj file I added this reference:
+
+ False
+ ..\bin\Oracle.ManagedDataAccess.dll
+
I obtained the dll from oracle.manageddataaccess.23.26.100.nupkg
The results are a clean compile...
Target: Rebuild
VS common tools: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\
. . .
msbuild My_Solution.sln /target:Rebuild...
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
. . .
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\resgen.exe" /useSourcePath /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Configuration.dll". . .
Build succeeded.
0 Warning(s)
0 Error(s)
When I load the solution and start it within Microsoft Visual Studio Enterprise 2017 Version 15.9.11 it works, but at the point where a connection to the Oracle database is attemped this error results:
Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
1. What does this error mean?
2. Why does switching from non-managed to managed ODP.NET require this threading component.
I hope someone here can help me, however, I have tried to resolve this issue by adding a reference to System.Threading.Tasks.Extensions.dll. I obtained the dll from the package system.threading.tasks.extensions.4.6.3.nupkg.
Alas, this resulted in a stack overflow error.
The lib directory has several directories:
Directory of C:\. . .\system.threading.tasks.extensions.4.6.3\lib
03/31/2026 12:16 PM
.
03/31/2026 12:16 PM ..
03/31/2026 12:16 PM net462
03/31/2026 12:16 PM netcoreapp2.1
03/31/2026 12:16 PM netstandard2.0
03/31/2026 12:16 PM netstandard2.1
I used the dll from net462 even though '462' doesn't match 4.7.2 reference (.NETFramework\v4.7.2) I see in my project. Should I perhaps have used one of the others?
With kind regards,
-Randy