• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
.NET Framework Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Downloads
 
 
Support
 
 
Community
 
 
Forums
 
 
 
.NET Framework Developer Center > .NET Development Forums > MSBuild > Exec task and "error :" in output
Ask a questionAsk a question
Search Forums:
  • Search MSBuild Forum Search MSBuild Forum
  • Search All .NET Development Forums Search All .NET Development Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerExec task and "error :" in output

  • Wednesday, June 18, 2008 2:03 PMAnt1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    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
    • ReplyReply
    • QuoteQuote
     

Answers

  • Monday, June 23, 2008 9:25 AMRong-Chun ZhangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    1
     

    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.
    • Proposed As Answer byFeng ChenMSFT, ModeratorMonday, June 23, 2008 9:29 AM
    • Marked As Answer byAnt1 Monday, June 23, 2008 12:11 PM
    • Marked As Answer byAnt1 Monday, June 23, 2008 12:11 PM
    •  
    • ReplyReply
    • QuoteQuote
     

All Replies

  • Monday, June 23, 2008 11:55 AMAnt1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    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
    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement