views:

93

answers:

1

Consider This:

I have folder called \SQLCE35Dlls inside my solution. It has some dlls that are required for application to interact with a SQLCE database in a stand alone fashion [without sql server ce 35 install on the PC].

After a build, I want these files to go to bin/debug and not to bin/debug/SQLCE35Dlls/. Setting "Copy if Newer" creates the latter situation. I want the former.

Is it possible to facilitate this or does this have to done as part of the installer script? [avoiding the solution of adding the dlls at the root level of the solution instead of inside a folder].

This is a Winforms project solution.

+1  A: 

You can perform any custom file copying operations by adding a post-build event command. Look at the Build Events tab of the project properties page.

Create the command using the xcopy command and the appropriate built-in macros. Click the Edit Post-build button to see the macros.

example:

xcopy $(TargetDir)\SQLCE35Dlls $(TargetDir)

This should copy all the files from bin\debug\SQLCE35Dlls to bin\debug.

Charles
Thanks Charles, that did it. I ended up using the following to avoid 2 copies of the .dlls floating around.MOVE /Y $(TargetDir)\SQL35ReqDlls\*.dll $(TargetDir)
CF_Maintainer