我將如何抑制所有警告(或者至少儘可能多的警告,因爲以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. F#抑制警告
- 3. 如何抑制的foreach()警告PHP的
- 4. 如何抑制龍目警告
- 5. 如何抑制Schtask.exe的警告
- 6. 如何抑制GNU八音警告
- 7. 如何抑制Swift 3中的警告?
- 8. 如何抑制編譯器警告
- 9. 如何在CheckStyle中抑制警告?
- 10. 抑制所有的錯誤,警告,棄用等消息
- 11. 如何使用顯式強制轉換來抑制此警告?
- 12. 抑制Ansible Ad Hoc警告
- 13. 在rpy2中抑制警告
- 14. 抑制Objective-C警告
- 15. 抑制gfortran警告消息
- 16. 抑制rsOverlappingReportItems的警告
- 17. 抑制MatPlotLib良性警告
- 18. 如何使用eslint抑制sublimelinter中的警告?
- 19. 如何使用EF7 RC2抑制環境交易警告
- 20. 如何在使用stmt.compile打印查詢時抑制SQLAlchemy警告?
- 21. 如何使用Closure Compiler @抑制多個警告?
- 22. 如何[暫時]抑制「已定義但未使用」的警告?
- 23. 如何使用gcc抑制boost :: thread警告?
- 24. 抑制閃亮的應用plotly警告
- 25. 抑制iphone應用程序maynotRespond警告
- 26. 如何抑制警告略有困難:axes_prop.cycle和axes_color.cycle
- 27. 如何在C++中抑制有關未使用變量的警告?
- 28. 如何在reSTructuredText中抑制或禁用警告?
- 29. 如何從wxWidgets/wxPython應用程序中抑制Gtk警告?
- 30. 如何抑制「警告:控制到達非void函數結束」
謝謝!這正是發生的事情!此外,軟件在這裏發佈的方式要求非開發人員從軟件庫中構建,並且我希望爲他們禁止警告。 但是,當時間出現時,問題將得到解決。 – 2010-01-13 17:54:31