EDIT: I revised this answer for an upgrade. In addition, to clarify, ClickOnce is just an application deployment tool, how to use Oracle Client and ODP.Net with your application is still architecture-defined. Here is a summary of the most common scenarios:
Smart client applications (e.g. client application + web service)
Your client application, configured by ClickOnce, is installed on users' computers, but talks about some kind of data service. In this case, your client application does not need to distribute Oracle Client or ODP.Net.
The Oracle Client and ODP.Net package must be installed using the usual Oracle instructions on the machine hosting the server service and reference this project / application, since any other library will be used / distributed.
Fat Client Thin Deployment Applications (such as Citrix Fat Client)
Your ClickOnce-based client application is fat because it includes its own data layer and therefore must be able to connect to Oracle through a locally installed client and be able to reference ODP.Net libraries.
In this case, Oracle Client and ODP.Net packages must be installed on the host machine (for example, Citrix) using standard Oracle instructions, and your application must reference the appropriate libraries installed on its hosting.
Fat Client applications "Fat Deployment" (for example, fat-client on users computers)
In this case, your application is a typical "fat client" because it has its own data layer and should be able to communicate with the Oracle Client and ODP.Net libraries.
The specific scenario that we are discussing here is how to distribute Oracle Client and ODP.Net in your application (for example, when your users do not have these products installed on their machines). Following are the instructions:
Download the Oracle Data Access Components data package .
(A) The current version is ODAC 11.2 Release 4 (11.2.0.3) and includes support for Microsoft Entity Framework 4.
(B) You will need the 32-bit version of ODP.Net installed since Visual Studio is a 32-bit application. You can then compile the target processor and version of the bits during deployment.
The ODAC package contains the Oracle Instant Client and ODP.Net libraries. You need to copy the libraries of instant clients into your application and set them to "Always Copy"
Link Oracle.DataAccess.Client, like any other lib, and set Copy Local = True .
The connection string should look like a regular entry in the TNSNAMES.ORA file:
Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SID = oracle_world_here)));User Id=schema_here;Password=password_here;Persist Security Info=TRUE;
Notes
but. There are two main versions of the instant client: the full version (about 115 MB), which includes support for several languages, and the Lite version (about 28 MB) that supports only English.
B. IMPORTANT Ensure that the libraries deployed are all from the same client version - this means that when you deploy 32-bit ODP.Net, you need to deploy 32-bit instant access client libraries. If you are using 11.2 instant client, you cannot use 11.0 ODP.Net etc. - silly, but many people do not notice it; Use a good source of control.
C. My experience, the following libraries were put at the root of my project (to avoid any permission problems or% PATH%)
oci.dll, ociw32.dll, orannzsbb11.dll, oraocci11.dll, oraociicus11.dll, oraops11w.dll
Summary and results:
Now you can use ClickOnce deployments for all Windows Client applications - fat, subject or smart.