I am having an issue with a .net Winforms c# app. I am using Visual studio 2013. The project build platform is x86 with .NET 4.5 The program runs fine, but there are two .dll files that are being included in the output files. The files are oracle.dataaccess.dll and a related oracle .dll. I don't think this is a problem with these particular .dll's, or with Oracle, but rather with the way the application files are generated during the project build. The program runs fine on the development machine, but when I deploy it, the program fails because the production box has a different oracle subversion. If I delete this dll (and a related one) from the application folder of the production box, the program finds the correct version in the GAC and everything works fine. I don't know why this .dll continues to be included in the deployment. In the publish tab of the project menu properties -->publish --> Application Files screen, I specified "Exclude" for this dll, but it doesn't seem to make a difference. At one time, I did specify this "copy local" as a property of the reference, but even after changing it back. it continues to be copied local as if this is a sticky setting (once local, always local). There must be a setting somewhere that I can tell the build program not to copy these dll's. Would there be a problem if I deleted the .DEPLOY artifacts in a post-build event? I use an installshield ( the lousy "free" version) project to package this app before it is installed on the production box, so I need to make sure that anything I do won't cause that project to fail.
Any suggestions would be appreciated.