15

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". 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?

SteveC
  • 15,808
  • 23
  • 102
  • 173
Andrey
  • 20,487
  • 26
  • 108
  • 176

1 Answers1

27

Just figured out:

if not $(ConfigurationName) == Debug  
   copy /y $(ProjectDir)memcached.$(ConfigurationName).config 
           $(ProjectDir)memcached.config
SteveC
  • 15,808
  • 23
  • 102
  • 173
Andrey
  • 20,487
  • 26
  • 108
  • 176