I am using a Visual Studio project with custom build script/batch file (ala make, ant, etc.).
我正在使用Visual Studio项目与自定义生成脚本/批处理文件(ala make,ant等)。
When the build is run from the command line we have placed colored highlighting on various output lines.
当从命令行运行构建时,我们在各种输出行上放置了彩色突出显示。
However, when built via Visual Studio (2005 in my case) the output window does not show the color anymore.
但是,当通过Visual Studio(在我的情况下为2005)构建时,输出窗口不再显示颜色。
Is this possible? I am quite happy to put specific code into the build script if required.
这可能吗?如果需要,我很乐意将特定代码放入构建脚本中。
4 个解决方案
#1
-1
As far as I know, the output panel doesn't support colouring, and probably that's why it's stripping the colouring out of the build output. Supposedly all the relevant bits they need to highlight when you compile on command line will be easier to see in the IDE, listed as errors/warnings/etc.
据我所知,输出面板不支持着色,这可能就是为什么它会剥离构建输出的着色。据推测,在命令行上编译时需要突出显示的所有相关位将更容易在IDE中看到,列为错误/警告/等。
#2
12
If you don't want to go with the pro version of the VSCommands plug-in, there is a free one called VSColorOutput, which does just that. I've worked with it a bit, does what it says.
如果您不想使用VSCommands插件的专业版,那么有一个名为VSColorOutput的免费版本就可以实现。我已经和它合作了一下,做了什么。
See http://coolthingoftheday.blogspot.com/2011/12/vscoloroutput-visual-studio-output.html or look it up in the extension gallery.
请参阅http://coolthingoftheday.blogspot.com/2011/12/vscoloroutput-visual-studio-output.html或在扩展程序库中查找。
#3
9
The VSCommands plug-in for Visual Studio 2010 adds colour formatting to the output window so errors are red. I'm not sure how they are doing it but it might give you a starting point.
Visual Studio 2010的VSCommands插件将颜色格式添加到输出窗口,因此错误为红色。我不确定他们是怎么做的,但它可能会给你一个起点。
#4
4
The problem isn't with your build scripts, but with Visual Studio not supporting ANSI control codes to change the color.
问题不在于您的构建脚本,而是Visual Studio不支持ANSI控制代码来更改颜色。
#1
-1
As far as I know, the output panel doesn't support colouring, and probably that's why it's stripping the colouring out of the build output. Supposedly all the relevant bits they need to highlight when you compile on command line will be easier to see in the IDE, listed as errors/warnings/etc.
据我所知,输出面板不支持着色,这可能就是为什么它会剥离构建输出的着色。据推测,在命令行上编译时需要突出显示的所有相关位将更容易在IDE中看到,列为错误/警告/等。
#2
12
If you don't want to go with the pro version of the VSCommands plug-in, there is a free one called VSColorOutput, which does just that. I've worked with it a bit, does what it says.
如果您不想使用VSCommands插件的专业版,那么有一个名为VSColorOutput的免费版本就可以实现。我已经和它合作了一下,做了什么。
See http://coolthingoftheday.blogspot.com/2011/12/vscoloroutput-visual-studio-output.html or look it up in the extension gallery.
请参阅http://coolthingoftheday.blogspot.com/2011/12/vscoloroutput-visual-studio-output.html或在扩展程序库中查找。
#3
9
The VSCommands plug-in for Visual Studio 2010 adds colour formatting to the output window so errors are red. I'm not sure how they are doing it but it might give you a starting point.
Visual Studio 2010的VSCommands插件将颜色格式添加到输出窗口,因此错误为红色。我不确定他们是怎么做的,但它可能会给你一个起点。
#4
4
The problem isn't with your build scripts, but with Visual Studio not supporting ANSI control codes to change the color.
问题不在于您的构建脚本,而是Visual Studio不支持ANSI控制代码来更改颜色。