Is there a task in MSBuild that's synonymous with NAnt's <echo>
task?
I don't want anything fancy, just a simple message output to stdout
.
If MSBuild determines that any output files are out of date with respect to the corresponding input file or files, then MSBuild executes the target. Otherwise, MSBuild skips the target. After the target is executed or skipped, any other target that lists it in an AfterTargets attribute is run.
MSBuild includes common tasks that you can modify to suit your requirements. Examples are Copy, which copies files, MakeDir, which creates directories, and Csc, which compiles Visual C# source code files.
Message importance can have a value of high , normal or low . The default value is normal .
A target element can have both Inputs and Outputs attributes, indicating what items the target expects as input, and what items it produces as output. If all output items are up-to-date, MSBuild skips the target, which significantly improves the build speed. This is called an incremental build of the target.
MsBuild has the Message task built in which will output a string to the console:
<Target ...> <Message Text="text to output" /> </Target>
By default, MSBuild logs at minimal
verbosity which will prevent these messages from being seen. Either increase the verbosity, or set the Message
's Importance
parameter to high
:
<Target ...> <Message Text="text to output ALWAYS" Importance="high" /> </Target>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With