visual studio - VS 2008 C++: How can I copy other files to the output folder? -


in ms visual studio 2008, it's easy copy non-c# files, such xml file, in c# project output folder. add file project, select in solution explorer, select properties, , there's choice named "copy". can choose "do not copy", "copy", , "copy if newer".

but in c++, it's not easy, because there never similar in earlier versions of microsoft's compilers. option have add post-build event old-fashioned dos command line command copy file target path. there's no way know of compare dates on input , target files, if target file exists.

i tried adding files c++ project in same in c# project. options files included custom build step. tried putting copy command in there, didn't work.

is there way don't know same result in c#: nice, clean, easy way specify file copied project folder output folder if newer file in output folder?

thanks much!

robr

in post-build event, use robocopy instead of basic copy command (it more intelligent, can manage file modification dates e.g. robocopy /xo <...>)

see http://technet.microsoft.com/en-us/library/cc733145%28v=ws.10%29.aspx


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -