I am using msbuildtask to validate an XML file in Build. I can do this using the Execute method after expanding Task. It is not possible to display custom warnings or messages indicating the reason for the assembly to fail. Is there any custom way to throw a compiler warning out of code?
I found that using the ITask interface gives us more power to interact with the Msbuild engine than the Task interface.
WARN, -
WARN
#if WARN #warning (Warning message) #endif
, #error.
#error