1

I have a set of applications launched during build (msbuild). Command metadata is used for testing only in production it will contain real command line. How can I implement the output for Exec task to know that Application 1 is completed with exit code 1608, and Application 2 with exit code 1605.

<ItemGroup>
    <App Include="Application 1">
        <Command>exit 1608</Command>
    </App>
    <App Include="Application 2">
        <Command>exit 1605</Command>
    </App>
</ItemGroup>

<Exec Command="%(App.Command)" ContinueOnError="true">
    <Output TaskParameter="ExitCode" ItemName="ExitCode"/>
</Exec>

<Message Text="%(App.Identity) was completed with ExitCode="???"/>
athspk
  • 6,722
  • 7
  • 37
  • 51
Warr
  • 118
  • 6

0 Answers0