Suppressing output with the Exec task in msbuild

msbuild

Solution

Ok, figured it out ... cmd.exe required a /c argument to work for what I wanted i.e.:

Also, it should be `>` instead of `<`

<Exec Command="cmd.exe /c sqlplus.exe  $(someCommandSpecificSettings) &gt; test.txt"/>

Problem

I'm running a command using the msbuild "Exec" task. However I do not want the stdio output generated from the command to appear in the console, is there anyway to suppress it? Maybe something along the lines of using the Exec task to call "cmd.exe" with my command exe is a target , and then using ">" to redirect the output somewhere else. (However I'm unable to get this solution to work). i.e. ``` <Exec Command="cmd.exe sqlplus.exe $(someCommandSpecificSettings) &lt; test.txt"/> ``` Any suggestions to get my example to work or alternatives?

Original source