c# - Copy file(s) from one project to another using post build event...VS2010 -
i have solution 3 projects in it. need copy view 1 project another. i'm able copy created dll via post build events so:
so want copy file in project 1 '/views/modulehome/index.cshtml' folder in project 2. how copy file(s) desired project via post-build event? thanks
xcopy "$(projectdir)views\home\index.cshtml" "$(solutiondir)mefmvcpoc\views\home"
and if want copy entire folders:
xcopy /e /y "$(projectdir)views" "$(solutiondir)mefmvcpoc\views"
update: here's working version
xcopy "$(projectdir)views\moduleahome\index.cshtml" "$(solutiondir)mefmvcpoc\views\moduleahome\" /y /i
here commonly used switches xcopy
:
/i - treat directory if copying multiple files /q - not display files being copied. /s - copy subdirectories unless empty. /e - copy empty subdirectories. /y - not prompt overwrite of existing files. /r - overwrite read files.
Comments
Post a Comment