简体   繁体   中英

pre/post build event Visual Studio

How can I write pre build event, that will copy file from solution folder to document folder. Path to document can change(solution may be run on different machine)

you can use xcopy or copy command from DOS in pre or post build events. I have used that to maintain multiple web config files in asp.net applications and multiple releases with different configuration in desktop applications.

for example: xcopy "$(TargetPath)" "$(SolutionDir)$(OutDir)" /i /d /y

Also check out this article, this may help http://geekswithblogs.net/dchestnutt/archive/2006/05/30/80113.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM