Can we have something like this:
if \"Debug\"==\"$(ConfigurationName)\"
(
goto :nocopy
)
else if \"Release\"==\"$(ConfigurationName)\"
(
del \"$(TargetPath).
If your post-build logic is getting complicated, I'd suggest moving it to an external file. For example, the following post-build event:
CALL "$(ProjectDir)PostBuild.cmd" $(ConfigurationName)
executes a batch file PostBuild.cmd in the project-directory, passing $(ConfigurationName) as a parameter. You could also pass other parameters, such as $(TargetPath).
You can then implement whatever you want including multiple if statements, and more importantly, debug it without running a Visual Studio build.