开发者

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

开发者 https://www.devze.com 2022-12-27 22:55 出处:网络
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!foo.csproj

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!


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'.

0

精彩评论

暂无评论...
验证码 换一张
取 消