Lassi Autio
Lassi Autio

Reputation: 1239

Best way to include Oracle.DataAccess.dll

I have two projects. In one I have included Oracle.DataAccess.dll into project. In csproj it looks like:

<Reference Include="Oracle.DataAccess, ...">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>myFolder\Oracle.DataAccess.dll</HintPath>
</Reference>

In another project I am using machine's own Oracle.DataAccess.dll and I haven't included it in project. Csproj file looks like:

<Reference Include="Oracle.DataAccess, ...">
  <Private>False</Private>
</Reference>

Which should I use? I have had problem with first one (to include dll to project as a file) but I don't know is this the root cause.

Upvotes: 1

Views: 2961

Answers (2)

Bharathiraja
Bharathiraja

Reputation: 812

Include Oracle.DataAccess from Nuget package. Below are the steps to install library:

Go to solution explorer -> right click the project -> manage Nuget packages -> navigate to browse tab -> type 'Oracle DataAccess' -> Search -> Scroll down you could see Oracle.DataAccess for 64 bit -> install the stable version.

For your information as suggested by previous post, if you install Oracle.ManagedDataAccess then you may need to change in the existing code.

My suggestion is if you are going to work on new project go with Oracle.ManagedDataAccess since it is a latest one. Suppose if you are going to build existing project then find and install exact version of Oracle.DataAccess.

Upvotes: 0

Gilles
Gilles

Reputation: 5407

Use the NuGet package Oracle.ManagedDataAcces made by Oracle. This will include the dll as a file in your project and you will get all the advantages of using a NuGet package.

It will ensure the correct version of the dll is included for everyone and when the application is deployed.

All of the configuration and file manipulation will be done for you.

Upvotes: 1

Related Questions