Here is my Xcopy solution.
I posted it over at
But I think I can post my xml without formatting issues here.
tag below. this may or may not be needed, but I figured it was better to clear them out since you don't know what may be in the machine.config file)
I am developing on a x64 Windows 7 machine.
Which is the:
ODAC 11.2 Release 5 (184.108.40.206.20) Download the XCopy version [Released September 11, 2012]
I unzipped this zip file.
I searched and fished out these files:
Note, when there were 2 files of the same name, I took the "bin\2.x\" or "odp.net20\bin" version for my 3.5 Framework need (I'm not on 4.0 yet).
I took these files, and put them in a subfolder from where my .sln file resides.
I place all the files above in the
I used "Add Reference" to add a reference to Oracle.DataAccess.dll to the "MyConsoleApp.csproj" csharp project.
(This meant browsing to "..\ThirdPartyReferences\Oracle\" of course)
I used a "Post Build Event" to copy the "extra" (aka, "accessory)" files
My lines in my post build event were:
copy $(ProjectDir)..\ThirdPartyReferences\Oracle\oci.dll $(TargetDir)*.*
copy $(ProjectDir)..\ThirdPartyReferences\Oracle\orannzsbb11.dll $(TargetDir)*.*
copy $(ProjectDir)..\ThirdPartyReferences\Oracle\oraociei11.dll $(TargetDir)*.*
copy $(ProjectDir)..\ThirdPartyReferences\Oracle\OraOps11w.dll $(TargetDir)*.*
Note, my post build event replaces the "Copy if Newer" from the URL instructions above.
When I ran my project........I got a few missing dll errors.
In the assembly that has your calls to the EnterpriseLibrary.Data objects‚Ä¶you‚Äôll get ‚ÄúCannot find Microsoft.Practices.SomethingSomething namespace. Just keep adding references to these dll‚Äôs (that the above package.config will pull down) until the errors go away.
Like here is a specific one:
"Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
So (after running Nuget of course, to download all the files)
I went and added a reference to:
That cleared up the issues.
And my csharp code: (note "select *" is for demo purposes only)
public IDataReader EmployeesGetAll()
IDataReader returnReader = null;
Database db = DatabaseFactory.CreateDatabase();
DbCommand dbc = db.GetSqlStringCommand("SELECT * FROM ( SELECT * FROM TEMPLOYEE ) WHERE ROWNUM <= 25");
returnReader = db.ExecuteReader(dbc);
And it worked.
I think this makes ODP.NET an "xcopy" deployment.
I still need to test on a clean machine to be sure.
But its the end of the day..............
Everything above is correct. However, I hit a caveat.
I was using a "Console Application" to test my code.
When you add a new Console Application to visual studio, it DEFAULTS to x86.
As seen here:
EDIT: (Updated link)
So when I put all the configuration and code and stuff in a real project (which was set to "Any CPU" on a x64 bit machine)...everything I had done stopped working. :<
After tweaking a bit........
I found this file on oracle.com
I then repeated everything I did above , but searching the unzipped files of this x64 zip file.
Everything is working.
But that "x86" default thing with a Console application threw me for a loop.