简体   繁体   中英

Include Oracle.DataAccess.dll in Visual Studio C# Project

My project makes use of the Oracle.DataAccess.dll DLL and when I build and run my application it works fine on my PC, as I have added the reference in my project to it C:\\Oracle\\instantclient_11_2_dc\\odp.net\\bin\\4\\Oracle.DataAccess.dll

However when I run on another machine without this reference it fails installation with the following message.

无法安装或运行该应用程序

How do I include the DLL file in my project so it is deployed with it as as requirement, and doesn't reference my local file system?

You have to install the Oracle client on the client machine if this is a client/server application. If it is web based application then it should be installed there.

I don't use the instant client as I end up wanting to edit the connections in the TNSNames.ora so I use the full or Administrator install. The client version will usually connect back or forward two Oracle versions but life is easier if you use the version appropriate to your database version.

You'll want to install the Oracle Data Access Components from here: http://www.oracle.com/technetwork/topics/dotnet/downloads/net-downloads-160392.html?ssSourceSiteId=ocomen on your dev machine AND any servers you plan on deploying to (or you can xcopy install per How can I deploy a .NET application that uses ODAC without installing the whole component to the user? ). Also marked Q as duplicate to this one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM