简体   繁体   中英

How do I just run a projects post build rules with out rebuilding in Visual Studio 2008 (C++ project)

我的解决方案中有几个项目,其中一个有一些测试脚本可以作为后期构建规则的一部分进行复制,有没有办法运行后构建规则而不需要为该项目执行“仅重建”他们跑吗?

You could use Custom Build Step instead of post-build event and specify some dummy non-existent Output file. In this case Custom Build Step will run on every build even if project itself is up to date.

Quote from MSDN:

In Outputs, specify the name of the output file. This is a required entry; without a value for this property, the custom build step will not run. If a custom build step has more than one output, separate file names with a semicolon. The name of the output file should be what is specified in the Command Line property. The project build system will look for the file and check its date. If the file is newer than the input file or if the file is not found, then the custom build step will run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM