Microsoft 开发人员网络 > 论坛主页 > MSBuild > Exec task and "error :" in output
提出问题提出问题
 

已答复Exec task and "error :" in output

  • 2008年6月18日 14:03Ant1 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hi,

    I just discovered a strange behavior of the exec task :

    <Exec Command="echo error : "/>

    will fail with code -1

    and

    <Exec Command="echo warning : " />

    will print a warning.


    Is it possible to disable this command output parsing ? I currently use ContinueOnError="True" but that modify my build logs.


    Regards,
    Ant1

答案

  • 2008年6月23日 9:25Rong-Chun ZhangMSFT, 版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
     

    Hi Ant1,

    By default, MsBuild will format the warnings and errors which Visual Studio can then display. We can ignore this beahvior in 3.5 by setting the IgnoreStandardErrorWarningFormat parameter to True. Please try something like the following:

    <Exec Command="echo error:" IgnoreStandardErrorWarningFormat="true"/>

    Hope this helps.
    Best regards.
    Rong-Chun Zhang

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs


    Please mark the replies as answers if they help and unmark if they don't.
    • 已建议为答案Feng Chen版主2008年6月23日 9:29
    • 已标记为答案Ant1 2008年6月23日 12:11
    • 已标记为答案Ant1 2008年6月23日 12:11
    •  

全部回复

  • 2008年6月23日 9:25Rong-Chun ZhangMSFT, 版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复
     

    Hi Ant1,

    By default, MsBuild will format the warnings and errors which Visual Studio can then display. We can ignore this beahvior in 3.5 by setting the IgnoreStandardErrorWarningFormat parameter to True. Please try something like the following:

    <Exec Command="echo error:" IgnoreStandardErrorWarningFormat="true"/>

    Hope this helps.
    Best regards.
    Rong-Chun Zhang

    Windows Forms General FAQs
    Windows Forms Data Controls and Databinding FAQs


    Please mark the replies as answers if they help and unmark if they don't.
    • 已建议为答案Feng Chen版主2008年6月23日 9:29
    • 已标记为答案Ant1 2008年6月23日 12:11
    • 已标记为答案Ant1 2008年6月23日 12:11
    •  
  • 2008年6月23日 11:55Ant1 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Oh, thanks a lot !

    I am missing something in the msdn ? I don't see anything about it here : http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx


    Thanks again,

    Ant1