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>