如何批量修改“后期生成事件”为“预生成事件”


在目标目录下打开everything,全词匹配搜索:*\*.vcxproj content:PostBuildEvent
在搜索结果中批量打开vcproj文件,批量替换“PostBuildEvent”为“PreBuildEvent”
注意:某些vcproj文件,可能已经存在空的PreBuildEvent标签,替换完成之后会存在两个PreBuildEvent标签,因此需要删除空标签。Notepad++打开文件,正则表达式搜索:
\s*<PreBuildEvent>\s*<Command>\s*</Command>\s*</PreBuildEvent>
将其替换为空即可!

浙公网安备 33010602011771号