I just want the logs to no show in the Output window when I compile a C# project.
I’m not interested in suppressing the warnings in code.
I also don’t want to change MSBuild project build output verbosity
in Tools->Options->Projects and Solutions->Build And Run
I want to see log from the build process but since the warnings are displayed in "Error List" window I don’t want to see them in build output.
Is it possible to filter the warnings?
Edit
I’m talking about warnings in The Output->Build window:
Currently I’m having problem with projects compiling on every start, even there are no changes i.e a problem they claim was fixed.
Above image shows output produced with minimal
output verbosity. Having 99.9% of the lines been "missing comment" etc. doesn’t help to diagnose build process problems.
2
Answers
Sure.
You just need View=>Error List
You can filter at the top of the Error List. If you only want to see Errors, just uncheck Warnings and Messages, like this:
You will no longer see Warnings and Messages when you debug the project later.
Generally speaking, I don’t recommend disabling warnings. They are there for obvious reasons 🙂
That being said, you cannot filter the build output window (aside from changing the verbosity settings), via the Tools | Options dialog, which it sounds like you don’t want to do.
This basically leaves you with configuring your projects, so they don’t produce the warnings. At the project level, you can do this by setting the WarningLevel to 0 in your various project files as described below:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings