简体   繁体   English

如何减少MSBuild工作流活动的详细程度?

[英]How to reduce the verbosity of the MSBuild workflow activity?

Here is an example of what I have today: 这是我今天所拥有的一个例子: 在此输入图像描述

And it remains the same regardless of the value passed to the Verbosity parameter. 无论传递给Verbosity参数的值如何,它都保持不变。

Is there a way to reduce this clutter? 有没有办法减少这种混乱?

We are using TFS 2015. 我们正在使用TFS 2015。

In a build process that is based on the Default Template or the Upgrade Template, you can use the Logging Verbosity build process parameter to manage the verbosity of the information that is logged and stored. 在基于默认模板或升级模板的构建过程中,您可以使用Logging Verbosity构建过程参数来管理记录和存储的信息的详细程度。 The following table lists the Logging Verbosity values and their corresponding effects: 下表列出了Logging Verbosity值及其相应的效果: 在此输入图像描述 More details please refer this link: Manage Build Information and Control Verbosity 更多细节请参考此链接: 管理构建信息和控制详细程度


If you are using a custom build template . 如果您使用的是自定义生成模板 Suggest you to use minimal Verbosity When Designing a Custom Build Process Template 建议您在设计自定义构建过程模板时使用最小的详细程度

Users of your build process rely on verbosity filtering to reduce information overload. 构建过程的用户依赖详细过滤来减少信息过载。 You can help make this filtering more effective by taking the following measures: Best Practice: Set Verbosity as Low as Possible 您可以采取以下措施,使此过滤更有效: 最佳实践:尽可能低地设置详细程度

These are basically the targets that MSBuild compiles, and as I experienced, it cannot really be controlled with the verbosity. 这些基本上是MSBuild编译的目标,而且正如我所经历的那样,它无法用冗长的方式来控制。

Our solution was to use custom activity to run the build (we have a wrapper), where we did not pass the TFS logger parameter to the MSBuild. 我们的解决方案是使用自定义活动来运行构建(我们有一个包装器),我们没有将TFS记录器参数传递给MSBuild。

However in such a case you should consider that the MSBuild task can run for long time, and your custom activity should be cancellable. 但是在这种情况下,您应该考虑MSBuild任务可以运行很长时间,并且您的自定义活动应该是可取消的。 In this topic I can suggest to read the below article: 在本主题中,我建议阅读以下文章:

https://devtfs.wordpress.com/2013/09/24/dealing-with-long-running-activities/ https://devtfs.wordpress.com/2013/09/24/dealing-with-long-running-activities/

You may also want to show the compiled targets somehow, therefore you might need to write your own custom MSBuild Logger and a UI to show the result as well. 您可能还想以某种方式显示已编译的目标,因此您可能需要编写自己的自定义MSBuild Logger和UI来显示结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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