I'd like to have a different verbosity for the msbuild project invoked from the commandline, and those invoked by the MSBuild task from within the project. For example:
Inside my.proj:
<Target Name=Foo>
<MSBuild Projects="a.csproj;b.csproj;c.csproj"/>
</Target>
On the commandline:
msbuild /v:d my.proj
now when the MSBuild task builds the .csproj files, it does it with detailed verbosity as well. However I'd want to build it with minimal verbosity.
I know it is possible to invoke msbuild manually like so:
<Target Name=Foo>
<Exec Command="msbuild /v:m a.csproj"/>
<Exec Command="msbuild /v:m b.csproj"/>
<Exec Command="msbuild /v:m c.csproj"/>
</Target>
or in practice
<Target Name=Foo>
<Exec Command="msbuild /v:m %(Projectlist.Identity)"/>
</Target>
and this works well off course, but then I cannot get the functionality of the BuildInParallel
switch anymore (I do not think it is possible to invoke msbuild from the commandline with multiple projects without them being contained in a solution?)
Update
I went with Ludwo's option: basically create a custom logger that holds two ConsoleLoggers as a member. One has the verbosity passed at command line, the other one is 'minimal'. The logger registers for all events and passes them to one of the loggers depending on whether a csproj file is currently being built or not. Output looks exactly like normal, except it doesn't include thousands of lines from the csproj files.