[英]“If” syntax for post-build macros in VS 2010
I'm trying to to add a post-build macro that would conditionally copy some files after the build if the configuration is not "Debug". 我正在尝试添加一个后构建宏,如果配置不是“Debug”,它将在构建后有条件地复制一些文件。 I'm trying the following:
我正在尝试以下方法:
if ('$(ConfigurationName)' <> 'Debug')
copy /y $(ProjectDir)memcached.$(ConfigurationName).config
$(ProjectDir)memcached.config
And I get error 255. What should be the right syntax for the 'if' statement? 我得到错误255.“if”语句的正确语法是什么?
Just figured out: 刚想通了:
if not $(ConfigurationName) == Debug
copy /y $(ProjectDir)memcached.$(ConfigurationName).config
$(ProjectDir)memcached.config
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.