title: How to deploy Entity Framework with Oracle ODAC 12 on WS2012 just copying DLLs
body: <p>I´ve searched the following links:</p>
  
  <p><a href="https://stackoverflow.com/questions/3935808/how-can-i-deploy-a-net-application-that-uses-odac-without-installing-the-whole">How to deploy Oracle with EF</a></p>
  
  <p><a href="https://stackoverflow.com/questions/9911948/oracle-instant-client-and-entity-framework-trouble-with-configuration">Problems deploying Oracle with EF</a></p>
  
  <p>And many other posts around regarding Oracle deployment. </p>
  
  <p>Basically I have an C# simple test application to insert some rows into a database (this is a test application. The full application uses a lot of EF stuff):</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading;
  using System.Diagnostics;
  using MzDbLib.DataAccessObject;
  using MzDbLib.DatabaseContext;
  using MzDbLib.DatabaseModel;
  
  namespace TestDbConnection
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("This program will generate 10 logs into SYSTEMDATALOG table");
  
              ///
              /// Do a loop of 10 logs generated
              /// 
              for (int i = 0; i &lt; 10; i++)
              {
                  string msg = "TEST GENERATED LOG NUMBER " + i.ToString();
  
                  Console.Write("Generating log " + i.ToString() + "...");
  
                  //
                  // Connect to database and to the log table
                  //
                  Entities dbContext = new Entities();
                  SYSTEMDATALOG logTable = new SYSTEMDATALOG();
  
                  logTable.DATETIME = DateTime.Now;
  
                  logTable.TYPE = "INFO";
  
                  logTable.SEVERITY = 0;
                  logTable.SOURCE = "TESTDBCONNECTION";
                  logTable.USER = "SYSTEM";
                  logTable.MESSAGE = msg;
  
                  dbContext.SYSTEMDATALOG.Add(logTable);
                  dbContext.SaveChanges();
  
                  Console.WriteLine("Done.");
              }
  
              Console.WriteLine ("Data generated at the database. Press a key to end test.");
              Console.ReadKey();
  
              // 
              // Application exit
              //
              Environment.Exit(0);
          }
      }
  }
  </code></pre>
  
  <p>The dbContext and SYSTEMDATALOG classes were generated though EF model-first from an Oracle database. I´m using Visual Studio 2012 and ODAC 12.1.0.1.0 with Oracle Developer Tools 32-bit installed on development machine. All fresh install and working pretty fine when developing.</p>
  
  <p>All runs fine in DEVELOPMENT, but neve in production. </p>
  
  <p>I´m using in production WINDOWS SERVER 2012. I have tried the following approaches:</p>
  
  <p>a) Install WS2012 from schatch and install ODAC 32-bit version 12.1.0.1.0 fresh from Oracle site. I did run install 
  with ODAC 4 version.</p>
  
  <p>I got "The provider is not compatible with the version of Oracle client". After some tries and some hours lost, with different approaches, I decided to go to a new method - non-installating Oracle</p>
  
  <p>b) I fresh installed WS2012 and did no ORacle installation. Copied the DLLs stated in the above links and now I´m getting "Unable to find the requested .NET data provider". I´ve copied all the available Oracle DLLs from DEV machine to the WS2012 EXE directory of my application and still getting that error.</p>
  
  <p>My connection string (auto-generated by VS2012) is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
      &lt;/startup&gt;
    &lt;connectionStrings&gt;
      &lt;add name="Entities" connectionString="metadata=res://*/DatabaseModel.DatabaseModel.csdl|res://*/DatabaseModel.DatabaseModel.ssdl|res://*/DatabaseModel.DatabaseModel.msl;provider=Oracle.DataAccess.Client;provider connection string=&amp;quot;data source=//ORACLESERVER1:1521/MEZAMES;password=xxx;persist security info=True;user id=MZMESDB&amp;quot;" providerName="System.Data.EntityClient" /&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>This string is being generated into 2 files: <code>TestDbConnection.exe.config</code> and <code>TestDbConnection.vshost.exe.config</code> (I´m copying the bin/Debug folder to the server).</p>
  
  <p>So, I need help to deploy my app to the new server. Some questions:</p>
  
  <p>a) Which DLL is needed to go with the application for ODAC 12.1.0.1 ? Does that changed from ODAC 11 ?</p>
  
  <p>b) Is that last error regarding EF or Oracle ?</p>
  
  <p>c) Why does VS generated 2 config files ?</p>
  
  <p>d) Does "providerName="System.Data.EntityClient" is the cause of the error ? If so, what DLL should be copied together.</p>
  
  <p>e) Is there any tool/way to know what´s missing or with incompatible version, avoiding copying and trying methods ?</p>
  
  <p>f) Is something missing on the config file ?</p>
  
  <p>Thanks all for any kind of help. This is making me crazy as I´m stuck on that since the beggining of the week...</p>