How do I write color text to the Visual Studio output window from c#?

前端 未结 7 1970
忘了有多久
忘了有多久 2020-12-19 06:16

I want to write color text to the Visual Studio output window from c#. I want to output red code from my unit tests.

相关标签:
7条回答
  • 2020-12-19 07:18

    In addition to Jeff Roe I've managed to get this:

    Warnings: Console.WriteLine($"Warning: Warning '{message}'");

    Errors: Console.WriteLine($"Error: Error '{message}'");

    Sadly I could not figure out how to get green output. If any1 could add this I would be super happy !

    0 讨论(0)
提交回复
热议问题