我如何获得< Message>要在Visual Studio项目输出中显示MSBuild任务? [英] How do I get the <Message> MSBuild task to show up in the Visual Studio project output?

查看:81
本文介绍了我如何获得< Message>要在Visual Studio项目输出中显示MSBuild任务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试 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 +++" />

这篇关于我如何获得&lt; Message&gt;要在Visual Studio项目输出中显示MSBuild任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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