skip to Main Content

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:

enter image description here

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


  1. Sure.

    You just need View=>Error List

    enter image description here

    You can filter at the top of the Error List. If you only want to see Errors, just uncheck Warnings and Messages, like this:

    enter image description here

    You will no longer see Warnings and Messages when you debug the project later.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search