I've got a program that outputs to a file. I'm running it from an MSBuild project. I'd like this output to be written to StdOut, so that it can be picked up by our build agent (TeamCity).
How do I get MSBuild to dump the content of a file to the output?
On the menu bar, choose Build > Build Solution. In the Output window, click somewhere in the text. Press Ctrl+S. Visual Studio prompts you for a location to save the build output.
To run MSBuild at a command prompt, pass a project file to MSBuild.exe, together with the appropriate command-line options. Command-line options let you set properties, execute specific targets, and set other options that control the build process.
A build log is an enhanced console output of a build. It is represented by a structured list of the events which took place during the build. Generally, it includes entries on TeamCity-performed actions and the output of the processes launched during the build.
The dos command type could to that.
<Target Name="ExecProgramAndOutputToStdOut">
<Exec Command="YourProgram.exe"/>
<Exec Command="type output_file"/>
</Target>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With