I'm writing a console application that requires data to be pulled from a database. When I use the following line to create the connection object, it throws a FileNotFoundException.
OracleConnection con = new OracleConnection();
I've installed and included the Oracle Managed Data Access Client, and I've attempted to rewrite the definition multiple ways, including passing the connection string in the definition, but it always throws the same exception.
Here's the exact message:
System.TypeInitializationException HResult=0x80131534 Message=The type initializer for 'OracleInternal.Common.ProviderConfig' threw an exception. Source=Oracle.ManagedDataAccess StackTrace: at Oracle.ManagedDataAccess.Client.OracleConnection..ctor(String connectionString) at SecurityAwareness.Program.Main(String[] args) in "directory"
Inner Exception 1: FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.