I have a .NET solution which contains multiple projects. All the projects which refer the Oracle.DataAccess.dll have set Copy Local = false for it. When I build the solution in Debug
mode, the dll does not get copied to bin\Debug
folder but in Release
mode, it does get copied to bin\Release
folder.
I am maintaining 64-bit and 32-bit dlls in bin64 and bin32 folder and resolving at runtime for these and it is working fine in Debug mode. But in Release
mode when application runs, I am getting exception that says Could not load file or assembly 'Oracle.DataAccess.dll', .....
Why is the dll getting copied to bin\Release
folder ?
After changing the Verbosity of MSBuild in Output Window, I found:
Copying file from "C:\app\brij\product\11.1.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll" to "bin\Release\Oracle.DataAccess.dll"