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

585353b9c1e5d7e0c80454c589a0d427

 

3995230708d2f7a9d48af69c33d95893

 

在目标目录下打开everything,全词匹配搜索:*\*.vcxproj content:PostBuildEvent

在搜索结果中批量打开vcproj文件,批量替换“PostBuildEvent”为“PreBuildEvent”

注意:某些vcproj文件,可能已经存在空的PreBuildEvent标签,替换完成之后会存在两个PreBuildEvent标签,因此需要删除空标签。Notepad++打开文件,正则表达式搜索:

\s*<PreBuildEvent>\s*<Command>\s*</Command>\s*</PreBuildEvent>

 

将其替换为空即可!

posted @ 2025-11-03 10:27  快雪  阅读(6)  评论(0)    收藏  举报