如何阻止 C# 编译器输出包装在 Visual Studio 2015 输出窗口中? [英] How do I stop the C# compiler output from wrapping in the Visual Studio 2015 output window?

查看:29
本文介绍了如何阻止 C# 编译器输出包装在 Visual Studio 2015 输出窗口中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用默认编译器在 Visual Studio 2015 中构建我的 C# 代码时(该项目没有什么异常),我在输出窗口中得到输出,看起来有点像这样.(实际宽度不具代表性,因为我已经用 XXX 替换了相当长的路径.)

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): 错误 CS1955: 不可调用成员 'Lo1>g'不能像方法一样使用.1>XXX(424,25,424,28): 错误 CS1955: 不可调用成员 'Lo1>g'不能像方法一样使用.

大概编译器正在打印不可调用成员'Log'不能像方法一样使用,并且某处正在介入并弹出换行符(实际上在第120列 - 如上所述,我的示例输出中的列数不具代表性).

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.

修复似乎是重新启动 Visual Studio.

The fix appears to be to restart Visual Studio.

这篇关于如何阻止 C# 编译器输出包装在 Visual Studio 2015 输出窗口中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆