常用的PostBuild Event 脚本

参考:

http://blog.csdn.net/fengzhijiaxu/article/details/4827364

http://blog.csdn.net/teng_ontheway/article/details/8307410

1.PreBuild格式化Xaml代码

call $(ProjectDir)..FormatXaml.exe

FormatXaml.exe在项目文件的上一级文件夹中。


2. PostBuild 拷贝指定文件

mkdir  $(OutputPath)3rdDll 
move $(OutputPath)c.dll  $(OutputPath)3rdDllc.dll 

3.条件判断

IF NOT $(ConfigurationName) == Release GOTO end

    call "C:/Program Files/XXX.exe" $(ProjectDir)$(TargetName).cvp

:end

4.Macro收集

$(DevEnvDir)

$(ProjectDir)

$(BuiltOuputPath)

$(ConfigurationName)

$(TargetName)  不含扩展名

$(TargetFileName)  包含扩展名


原文地址:https://www.cnblogs.com/xiaokang088/p/3240655.html