Deploying and Configuring ODP.NET to work without installation with Entity Framework

后端 未结 2 1931
你的背包
你的背包 2020-11-28 01:42

How do you deploy and configure ODP.NET to work without installation with Entity Framework?

A. How to deploy and configure Oracle.DataAccess.Client?

B. How t

2条回答
  •  猫巷女王i
    2020-11-28 01:48

    This answer summarizes (hopefully) all the steps required, many of which documented in various places online and might save someone hours of Googling.

    A. How to deploy and configure Oracle.DataAccess.Client.

    A.1. Download ODAC112030Xcopy_64bit.zip or ODAC112030Xcopy_32bit.zip.

    A.1.1. Extract the content of the following folders within the zip file into your application/host's bin/setup folder:

    A.1.1.1. instantclient_11_2

    A.1.1.2. odp.net4\bin\

    A.1.1.3. odp.net4\odp.net\bin\

    A.1.1.4. odp.net4\odp.net\PublisherPolicy\4\

    A.2. Add the following section to the beginning of your application's/host's app.config/web.config (if you already have a configSections element, add the section to it:

    
      

    A.3. Add the following sections to the end of your application's/host's app.config/web.config:

    A.4. From the ODAC112030Xcopy's folder Run:

    configure.bat odp.net4 somename
    

    I recommend using oraclehome112030_32 or oraclehome112030_64 as the "somename" above.

    
      
        
        
        
      
    
    
    
      
        
        
        
        
        
        
        
        
      
    
    




    B. How to deploy and configure Oracle.ManagedDataAccess.Client.

    B.1. Download ODP.NET_Managed_1120350_Beta.zip

    B.1.1. Extract the following files into your application/host's bin/setup folder.

    B.1.1.1. Oracle.ManagedDataAccess.dll

    B.1.1.2. x64\Oracle.ManagedDataAccessDTC.dll or x86\Oracle.ManagedDataAccessDTC.dll

    B.2. Add the following section to the beginning of your application's/host's app.config/web.config (if you already have a configSections element, add the section to it:

    
      

    B.3. Add the following sections to the end of your application's/host's app.config/web.config:

    
      
        
        
        
      
    
    
    
      
        
          
          
          
        
        
          
            
            
            
          
        
      
    
    




    C. For building:

    C.1. Add this section to your EDMX's assembly's app.config:

    (Haven't tried this with Oracle.ManagedDataAccess.Client yet)

    
      
        
        
        
        
        
        
        
        
      
    
    

    C.2. Add a file named Oracle.xsd to the same assembly with the content:

    
    
    
      
        
        
      
    
      
        
          
        
      
    
      
        
          
        
      
    
      
    
    
    

    C.3. Add the above XSD to the above app.config's list of Schemas.

    C.4. If you are getting errors for boolean mappings during build even though build is succeeding, add the app.config mappings to Visual Studio's devenv.exe.config.

    C.5. If you want to use Oracle.ManagedDataAccess.Client, either edit data provider attribute in the EDMX manually prior to build (I have not tried this) or edit it prior to creation of Context at run time and load MSSL from edited copy instead of from resource (this seems to work and I also use a similar trick to choose which MSSL to load for different DB providers).




    D. For designer support:

    D.1. Download win64_11gR2_client.zip or win32_11gR2_client.zip and install.

    D.1.1. Select "Administrator" as type of installation.

    D.2. download ODT and install.




    I tried this (A and B) on a blank machine (VM) with Windows 7 x64.

    This procedure does not seem to work with x86 version of Oracle.DataAccess.Client on Windows x64.

    The procedure does seem to work with the x64 version of Oracle.DataAccess.Client on Windows x64 and with both versions of Oracle.ManagedDataAccess.Client.

提交回复
热议问题