How to check if a target exists or not before it is called?

Is there a way to verify the existence of a goal so that we can call it only when it exists?

+6
msbuild
source share
1 answer

You can make the goal dependent on another goal

... <Target Name="Two" DependsOnTargets="One"> <Message Text="... comes Two." /> </Target> <Target Name="One"> <Message Text="After One ..." /> </Target> ... 

Your recent posts indicate that you are trying to rely heavily on the challenge of Goals, which, as I understand it, run counter to the philosophy of MSBuild.

Try to correlate the dependencies between your Goals.

+4
source share

All Articles