If you are using MSBuild 4.0.30319 and try to set the property
IgnoreStandardErrorWarningFormat on the Exec task you might run into the following message error:
error MSB4064: The "IgnoreStandardErrorWarningFormat" parameter is not supported by the "Exec" task.
The solution is very, very simple: be sure to add
ToolsVersion="4.0" to the Project tag.
<Project DefaultTargets="Bla" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<Target Name="Bla">
<Exec IgnoreStandardErrorWarningFormat="true" Command="dir /w" />
</Target>
</Project>