Reputation: 5492
How can i find out the reason why a BuiltIn function in c# is returning false.
For example.
I have implemented Execute method in Microsoft.Build.Framework.ITask in one of my child class.This Execute function will return "True" if task i gave to execute success otherwise it returns False.My question is if it returns false how can i find out the reason behind the failure.
Upvotes: 0
Views: 51
Reputation: 11025
Follow the example given in this example from MSDN, where you collect a Log
of messages that you can later request and analyze to determine what happened.
When the return value is false
, you retrieve the Log
, and examine it for failure conditions. This could be a class constructed any way you like.
Upvotes: 1