我将如何抑制所有警告(或者至少尽可能多的警告,因为以MSB为前缀的警告不能被抑制How to suppress specific MSBuild warning)?如何使用MSBuild抑制所有警告
24
A
回答
13
最好的方法是解决导致警告的问题。
如果必须忽略警告(例如,你继承了这么多,你不能见树不见林的一个项目),你可以尝试改变WarningLevel财产,http://msdn.microsoft.com/en-us/library/13b90fz7.aspx
56
的MSBuild/CLP :ErrorsOnly
/consoleloggerparameters: Parameters to console logger. (Short form: /clp) The available parameters are: PerformanceSummary--Show time spent in tasks, targets and projects. Summary--Show error and warning summary at the end. NoSummary--Don't show error and warning summary at the end. **ErrorsOnly--Show only errors.** WarningsOnly--Show only warnings. NoItemAndPropertyList--Don't show list of items and properties at the start of each project build. ShowCommandLine--Show TaskCommandLineEvent messages ShowTimestamp--Display the Timestamp as a prefix to any message. ShowEventId--Show eventId for started events, finished events, and messages ForceNoAlign--Does not align the text to the size of the console buffer DisableMPLogging-- Disable the multiprocessor logging style of output when running in non-multiprocessor mode. EnableMPLogging--Enable the multiprocessor logging style even when running in non-multiprocessor mode. This logging style is on by default. Verbosity--overrides the /verbosity setting for this logger.
+0
如果您想禁止特定的警告,则这可能不起作用。例如。在我的情况下,我想禁止警告MSB3270。 – 2013-11-27 04:49:23
+0
令人惊讶的帮助文档:https://msdn.microsoft.com/en-us/library/ms164311.aspx – Ben 2015-01-23 18:37:31
5
如果你想抑制MSB3270只有这样,你可以设置的项目文件,
<PropertyGroup>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
None
</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
相关问题
- 1. 如何抑制MaxPermSize警告?
- 2. 如何抑制Scalastyle警告?
- 3. 如何抑制m2e警告?
- 4. 抑制LNK4204警告
- 5. 抑制Autolayout警告
- 6. 抑制MySQL警告?
- 7. 抑制stream_socket_client警告
- 8. F#抑制警告
- 9. #pragma警告不会抑制警告
- 10. 如何抑制在Xcode警告?
- 11. 如何抑制Schtask.exe的警告
- 12. 如何抑制编译器警告
- 13. 如何在CheckStyle中抑制警告?
- 14. 如何抑制熊猫未来警告?
- 15. 如何抑制的foreach()警告PHP的
- 16. 如何抑制GNU八音警告
- 17. 如何抑制龙目警告
- 18. 如何抑制阴影“索引”警告?
- 19. 如何抑制Swift 3中的警告?
- 20. 如何使用显式强制转换来抑制此警告?
- 21. 抑制所有的错误,警告,弃用等消息
- 22. 抑制Ansible Ad Hoc警告
- 23. 抑制rsOverlappingReportItems的警告
- 24. 抑制值转换警告
- 25. 抑制MatPlotLib良性警告
- 26. 在rpy2中抑制警告
- 27. 抑制Objective-C警告
- 28. 抑制gfortran警告消息
- 29. 抑制方法GenericTypeAwarePropertyDescriptor警告
- 30. 如何在使用stmt.compile打印查询时抑制SQLAlchemy警告?
谢谢!这正是发生的事情!此外,软件在这里发布的方式要求非开发人员从软件库中构建,并且我希望为他们禁止警告。 但是,当时间出现时,问题将得到解决。 – 2010-01-13 17:54:31