Valentyn Vynogradskiy
Valentyn Vynogradskiy

Reputation: 653

MSBuild task silent execution

I have msbuild script that perfectly working. But when it runs when build task executed I'm seeing all output of building progress. Is there a way to just write :

Building project ... OK.

instead of 1000 rows of text?

Upvotes: 5

Views: 3938

Answers (1)

Isantipov
Isantipov

Reputation: 20969

Use verbosity parameter to set log to the level you'd like, e.g.:

msbuild myScript.proj /verbosity:quiet

UPD:

Sorry, that was not clear from the original question, but (from the comments) it looks like you want to have different verbosity levels for different Tasks. I don't think this is supported out-of-the box. You could try 2 solutions:

  1. Run your task using Exec task (see this question for details)
  2. Implement a custom logger and filter messages by task name.

Upvotes: 14

Related Questions