简体   繁体   中英

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

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.

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

The fix appears to be to restart Visual Studio.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM