Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to bundle a provider inside of my application?

MontyPythonAug 6 2018 — edited Oct 15 2018

Hi All,

I'm currently trying to figure out how to tell my program to use a local Oracle.ManagedDataAcess.Client.

My environment has multiple versions of Oracle.ManagedDataAcess.Client but I want my application to use the once I provide locally.

I have tried over and over again and it seems to be impossible to provide a dll for this thing to use. It searches on it's and finds whatever it wants to find in the GAC or machine.config.

This is not what I'm used to working with and is really making me reconsider why we even use Oracle at a .net shop.

I included the Oracle.ManagedDataAcess.Client from NuGet

pastedImage_1.png

Then when I go to run the program, I get the following error.

pastedImage_0.png

System.ArgumentException

HResult=0x80070057

Message=The specified invariant name 'Oracle.ManagedDataAccess.Client' wasn't found in the list of registered .NET Data Providers.

Source=System.Data.Common

StackTrace:

at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName, Boolean throwOnError)

at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)

at ConsoleOdpDotNetCore.Program.Main(String[] args) in C:\Users\%USERPROFILE%\Source\Repos\ConsoleOdpDotNetCore\ConsoleOdpDotNetCore\Program.cs:line 14

I'll buy you lunch if you can help me solve this problem. I have been stuck googling this same problem over and over again. I always end up the adjusting GAC and Machine.config to get it to work.

This post has been answered by MontyPython on Aug 8 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2018
Added on Aug 6 2018
6 comments
3,181 views