How do I stop the C# compiler output from wrapping in the Visual Studio 2015 output window?

不羁的心 提交于 2019-12-12 11:26:11

问题


When I build my C# code in Visual Studio 2015 using the default compiler (nothing unusual about the project), I get output in the output window that looks a bit like this. (The actual width isn't representative, as I've replaced the rather long path with XXX.)

1>XXX(402,13,402,16): error CS1955: Non-invocable member 'Lo 1>g' cannot be used like a method. 1>XXX(424,25,424,28): error CS1955: Non-invocable member 'Lo 1>g' cannot be used like a method.

Presumably the compiler is printing Non-invocable member 'Log' cannot be used like a method, and something, somewhere, is stepping in and popping newlines in (at column 120 in practice - as mentioned, column counts in my example output are unrepresentative).

Can I stop this? If so, how?

I'd much prefer the messages to be printed out with newlines in natural places, so I can use the output window's word wrap functionality.


回答1:


After you open the Package Manager Console, build output starts to become wrapped as above.

The fix appears to be to restart Visual Studio.




回答2:


Wow, I almost gave up finding someone asking this question. I can confirm the behavior described and restarting VS fixes it. Thanks!



来源:https://stackoverflow.com/questions/38456668/how-do-i-stop-the-c-sharp-compiler-output-from-wrapping-in-the-visual-studio-201

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!