How to integrate conditional logic in postbuild events
Posted
by codymanix
on Stack Overflow
See other posts from Stack Overflow
or by codymanix
Published on 2010-03-23T12:22:34Z
Indexed on
2010/03/23
12:23 UTC
Read the original article
Hit count: 309
Hi I have a visual studio project which includes postbuildevents in the following form:
MyTool.exe $(ProjectDir)somesrcfile.txt $(TargetDir)sometargetfile.bin
Now I want to add some logic saying that these steps are taking place only if the files have changed. In peudocode:
if (somesrcfile.txt is newer than sometargetfile.bin) { MyTool.exe $(ProjectDir)somesrcfile.txt $(TargetDir)sometargetfile.bin }
Can I do this with MsBuild?
© Stack Overflow or respective owner