Search code examples
c#.netoracleoracle-manageddataaccess

Issue with Oracle.ManagedDataAccess in .NET 8: System.Configuration.ConfigurationManager v0.0.0.0 FileNotFoundException


I'm encountering an issue while attempting to connect my .NET 8 application to an Oracle database using Dapper and Oracle.ManagedDataAccess version 21.13.0. The error message I'm receiving is as follows:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, version=0.0.0.0, Culture=neutral. The system cannot find the file specified."

I'm puzzled as to why it's trying to load the ConfigurationManager v0.0.0.0 assembly. Has anyone else experienced this issue, and if so, do you have any insights or solutions? Any help would be greatly appreciated!

Thanks in advance.


Solution

  • For a .NET 8.0 application you should be referencing Oracle.ManagedDataAccess.Core which supports .NET Core and upwards. It's most recent version currently is 3.21.130.

    You are referencing version 21.13.0 of the Oracle.ManagedDataAccess for the .NET Framework which supports .NET Framework 4.7.2 to 4.8.1.