Scott Langham
Scott Langham

Reputation: 60431

Can I get the success/failure of a task into a property if ContinueOnError="true" is used?

I'm executing a task in msbuild:

<MyTask ContinueOnError="true" OtherParam="Cheese"/>

<PropertyGroup>
  <MyTaskResult>????how do I set this????</MyTaskResult>
<PropertyGroup>

I want to get the result of MyTask into a property (it's Execute method returns a bool) so I can test it and conditionally do stuff. Is this possible?

Thanks.

Upvotes: 0

Views: 115

Answers (1)

Jay Bazuzi
Jay Bazuzi

Reputation: 46546

You could modify your task to put its results in an output parameter.

Upvotes: 4

Related Questions