我如何获得<消息>MSBuild 任务显示在 Visual Studio 项目输出中? [英] How do I get the <Message> MSBuild task to show up in the Visual Studio project output?
本文介绍了我如何获得<消息>MSBuild 任务显示在 Visual Studio 项目输出中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试printf 调试我的 Visual通过向控制台发送消息来创建 Studio 项目文件,如下所示:
I'm trying to printf debug my Visual Studio project file by spewing messages to the console like this:
<Target Name="BeforeBuild">
<Message Text="+++++++++++++++++++++++ Justin Dearing ++++++++++++++++++++++++++++++++++++" />
</Target>
这可以从命令行工作:
BeforeBuild:
+++++++++++++++++++++++ Justin Dearing ++++++++++++++++++++++++++++++++++++
但是,这些消息不会显示在 Visual Studio 2010 构建输出中.是否有我可以使用的替代 MSBuild 任务,或者我可以启用 Visual Studio 中的设置来显示这些消息?
However, the messages don't show up in the Visual Studio 2010 build output. Is there an alternative MSBuild task I can use, or a setting in Visual Studio I can enable to make these messages appear?
推荐答案
将值为 High 的 Importance
属性添加到 Message
.
Add the Importance
attribute with value High to Message
.
像这样:
<Message Importance="High" Text="+++ Justin Dearing +++" />
这篇关于我如何获得<消息>MSBuild 任务显示在 Visual Studio 项目输出中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文