Log warning and errors in a custom action
Some time ago I blogged about logging in custom action for TFS build 2010, I left out some details. Suppose you want to create a warning or an error and not a simple message, you need to create a specialized version of the LogWarning that logs a real warning.
You can do the same with errors.
These two methods permit you to log warnings and errors during a custom build action execution, let’s see how they affect the output. First of all you can verify that when you log an error the build partially succeeds
The error and warning are reported in the detailed report with their right icons
And they are also reported in the View Summary of the build
Next time I’ll explain you how to wrap a msbuild Custom Task in a custom action.
Alk.
Tags: Tfs