0 Replies Latest reply: Mar 13, 2014 6:07 PM by muffinman007 RSS

    Easy and minimum, ClickOnce Deploy ODP.NET, 11g

    muffinman007

      credit and sources:

      http://alderprogs.blogspot.com/2009/04/deploying-odpnet-with-oracle-instant.html
      http://jeremybranham.wordpress.com/2011/04/25/oracle-instant-client-with-odp-net/

      http://msdn.microsoft.com/en-us/library/hh873130.aspx

       

       

      video instruction:

      http://youtu.be/xBptxDqXkhs

       

      My dev env:

      Windows 7 x64

      VS11

      .NET 4.5

      Express Edition 11g Release 2

      ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio (11.2.0.3.20)



      The sources mentions that you need to download additional oracle package to obtain the necessary dll. In actuality you don't. All you need to do is search for those required dll files within the installed Oracle Client11g directory not the directory where you installed the Oracle Database 11g Express Edition.


      Oracle dll files:

      OraOps11w.dll

      oci.dll

      orannzsbb11.dll

      oraociei11.dll


      the Oracle.DataAccess.dll is in the reference section of the project Solution Explorer. Oracle.DataAccess will be changed.


      search for those dll files and copy/paste it to the project folder that contains the source.


      Open the project in VS.


      From the Solution Explorer click on "Show All Files"


      select all the oracle dll file, right click and  "Included In Projects". while those files are still selected, right click -> Properties.

      select "Copy if newer" option from Copy to Output Directory


      Go to References, delete the Oracle.DataAccess reference. Right click on the References folder -> select "Add Reference" -> click "Browse"


      go to the odp.net\bin\4\ folder within your oracle client 11g install path, select Oracle.DataAccess, click ADD and then OK

      for me that file is found in  D:\OracleDB\base\product\11.2.0\client_1\odp.net\bin\4


      In the Solution Explorer -> right click on your project -> Properties -> Publish


      Select where you want your file published.


      Next click on "Prerequisites..." -> select framework 4.5 and Download prerequisites from the same location as my application -> press ok


      follow step 1 to 3 here: http://msdn.microsoft.com/en-us/library/hh873130.aspx


      When done hit"Publish Now" and there you have it!