Thursday, November 22, 2007 7:31 PMDoes anyone know a way to force finish a build gracefully?
I want to do something like this.
<CheckProperty OnError="ExitGracefully"/> <--not 100% sure how I'll implement this</Target>
<Target Name="CheckTarget" inputs="xx" outputs="yy"/></Target>
<Target Name="ExitGracefully">...what goes in here? This needs to stop here and continue no furthe</Target>
<Target Name="CustomTargetWhichCantbeChanged" DependsOn="Foo"/>
If it doesn't follow this formual exactly that's fine, as long as it achieves the end goal of exiting the build process without throwing an exception or build error, and doesn't involve changing the target declaration of 'Foo' or altering the custom target in anyway.
Thanks for any help.
Friday, November 23, 2007 5:27 PMModerator
Can you put the CallTarget inside CheckTarget?
Monday, November 26, 2007 4:21 PMWould it not work to just put a Condition attribute on the task you're concerned about? If not, make a separate target for the stuff you don't want to execute if your condition fails, and put the Condition on the CallTarget for it.