Novice: Connecting to Oracle using ODP.NET with Enterprise Library
-
Hello, Thanks for reviewing my question. I am just starting out with working with an Oracle database. I wrote a simple console program that tries to connect to an Oracle database using the Enterprise Library, ODP.NET with written in C# using VS2013. I have ODAC 12.c installed on my PC. However, my program gets an exception when my program trys to open the database. using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; using Microsoft.Practices.EnterpriseLibrary.Data.Oracle; using Oracle.ManagedDataAccess.Client; ... OracleDatabase db = null; db2 = DatabaseFactory.CreateDatabase() as OracleDatabase; // System.Configuration.ConfigurationErrorsException was unhandled System.Configuration.ConfigurationErrorsException was unhandled HResult=-2146232062 Message=An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) (C:\ConsoleApp2.vshost.exe.Config line 3) Source=System.Configuration BareMessage=An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ... My app.config file contains the following: