Monthly Archives: June 2019

Oracle, Entity Framework and Visual Studio

As a new developer on an existing .NET project, I have run into a few errors while trying to get Visual Studio, Entity Framework and Oracle to play nice together. Things are finally working now and I have a couple of lessons learned that will resolve these errors.

‘Oracle.ManagedDataAccess.Client’ is either not registered in the machine or application config file, or could not be located.

Installing Oracle Managed Data Access Client from NuGet is not all you need. Visual Studio requires the Oracle Data Provider, part of Oracle Data Access Components.

In Visual Studio, go to Help > About and see if Oracle Developer Tools is listed under Installed Products. If not, get it here or look for “Developer Tools for Visual Studio” at oracle.com/downloads/.

Visual Studio About Page
Oracle Developer Tools Download Page
 
Your project references the latest version of Entity Framework however an Entity Framework database provider compatible with this version could not be found.

NuGet will default to the latest version of a package, but in this case you need to match the version installed on the project with the version of Oracle Developer Tools installed on Visual Studio. In this case, NuGet originally defaulted to 19.3.0 but downgrading to 18.3.0 fixed the error.

NuGet Oracle and Entity Framework packages