当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - How do I output coloured text from by unit tests in the R# Unit Test Session window in Visual Studio?

问题描述:

How do I output coloured text from by unit tests in the ReSharper Unit Test Session window in Visual Studio. I am using Resharper VS addin which I think produces the Unit Test Window.

I am using this with nunit and wish to use c# Console.Write to generate coloured text to this window.

网友答案:

It is not possible in my opinion. You write text to this window by using Debug.WriteLine() or Console.WriteLine().
How do you want to pass information about the color? I gave it two tries:

  • HTML is not parsed
  • The richtext format is not parsed

I have no other idea and I don't think that it is working somehow.

网友答案:

I think it is not possible because the output of log4net ColoredConsoleAppender is black and white in Resharper test runner.

分享给朋友:
您可能感兴趣的文章:
随机阅读: