My post-build event is:
"$(DevEnvDir)TF.exe" checkout "$(TargetPath)"
This checks out the target build assembly file. This is what I want, and it works great in VS.
On the build server, $(DevEnvDir)
is equal to *Undefined*
. So, I modified my post-build event to the following:
IF NOT "$(DevEnvDir)" == '*Undefined*' "$(DevEnvDir)TF.exe" checkout "$(TargetPath)"
The problem is, it still evaluates to see if $(DevEnvDir)TF.exe
is an executable, and on the build server it evaluates to *Undefined*TF.exe
, which throws this error:
'"*Undefined*TF.exe"' is not recognized as an internal or external command, operable program or batch file.
How can I conditionally execute this statement without it evaluating if the executable exists first?