Is there a way to print a new-line when using <Message...>?

CR = 0x0D or 13

LF = 0x0A or 10


Here's a better way. Use the "Escape()" property function [1] in a trivial msbuild file like so:

<Message Text="$([MSBuild]::Escape('A\r\nB\r\nC\r\n'))" /> 

The 'Escape()' property function should do all the magic in terms of escaping exotic characters.

[1] https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-escape-special-characters-in-msbuild?view=vs-2017 & https://docs.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2017


Try this: <Message Text="Line1%0aLine2%0aLine3%0a" />

Tags:

Msbuild