I don't think MSBuild itself supports outputting the SGR control sequences that ansicolor-plugin would recognize. The Microsoft.Build.Logging.ConsoleLogger class only sets Console.ForegroundColor or Console.BackgroundColor, and the .NET Framework on Windows implements those by calling SetConsoleTextAttribute, not by outputting characters.
If you were running MSBuild on .NET Core Framework on Unix, then the System.Console class would output SGR control sequences, and it should just work.
I think you can implement it on Windows by deriving a custom logger class from Microsoft.Build.Logging.ConsoleLogger, making its constructor call the ConsoleLogger(LoggerVerbosity, WriteHandler, ColorSetter, ColorResetter) constructor with delegates that output the SGR control sequences, and passing the name of the custom logger class to the MSBuild.exe /logger option.
I don't think MSBuild itself supports outputting the SGR control sequences that ansicolor-plugin would recognize. The Microsoft.Build.Logging.ConsoleLogger class only sets Console.ForegroundColor or Console.BackgroundColor, and the .NET Framework on Windows implements those by calling SetConsoleTextAttribute, not by outputting characters.
If you were running MSBuild on .NET Core Framework on Unix, then the System.Console class would output SGR control sequences, and it should just work.
I think you can implement it on Windows by deriving a custom logger class from Microsoft.Build.Logging.ConsoleLogger, making its constructor call the ConsoleLogger(LoggerVerbosity, WriteHandler, ColorSetter, ColorResetter) constructor with delegates that output the SGR control sequences, and passing the name of the custom logger class to the MSBuild.exe /logger option.