Build Event 常用

if exist "$(TargetDir)images" del "$(TargetDir)images"
if exist "$(TargetDir)images\icon" del "$(TargetDir)images\icon"


if not exist "$(TargetDir)images" md "$(TargetDir)images"
if not exist "$(TargetDir)images\icon" md "$(TargetDir)images\icon"
xcopy "$(ProjectDir)images\icon" "$(TargetDir)images\icon"



Pre-build event command line 
// 删除bin\Debug\images的所有文件
if exist $(TargetDir)images rd/s/q $(TargetDir)images

Post-build event command line
// 复制images的所有文件到 bin\Debug\ 
md "$(TargetDir)images"
xcopy "$(ProjectDir)images" "$(TargetDir)images" /d/e

C# 社区推荐