Nam G VU
Nam G VU

Reputation: 35374

How to suppress logger output when using <MSBuild ...> task?

I need to run an external MSBuild thread from inside another MSBuild project. What I need to do is to pass the /noconsolelogger to the task . How can I do this, please help!

Upvotes: 1

Views: 1117

Answers (1)

mhanney
mhanney

Reputation: 465

foo.csproj

<Project DefaultTargets="BuildAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="BuildAll">
        <Message Text="foo"/>
        <Exec Command="MSBuild.exe bar.csproj /noconsolelogger"/>
    </Target>
</Project>

bar.csproj

<Project DefaultTargets="BuildAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="BuildAll">
        <Message Text="bar"/>
    </Target>
</Project>

Output contains the message 'foo', but not 'bar'.

Upvotes: 2

Related Questions