none
Printing out a message in TFS 2010 Build

    Question

  • Hi guys,

    I have recently migrated one of my solution from SVN+CruiseControl to TFS2010. My build definition is using the Defaul Template. And I would like to customise the template. Since I have never worked with workflows before I decided to start by printing a simple message in the build log. For this purpose, I have added a WriteBuildMessage activity right on the top of the sequence as its first activity and given it a value of Hello World . However after saving it, checking it in the source control, queuing, completing a new build and then opening the build, I do not see the Hello World message any where in the View Log, Sumary tab or msbuild log file. I have tried putting the WriteBuildMessage activity at different places in the workflow but it just never gets printed. I can ensure that my build definition is pointing to the correct template but it just doesn't seem to print the message, as if it has never run the WriteBuildMessage activities in the workflow?

    Is there somethign I am mising or is WriteBuildMessage is not the correct activity to print a message in the log Any ideas?

    Regards,

    Nabeel


    Nabeel Farid
    Thursday, September 30, 2010 4:27 PM

Answers

  • If you want the output from WriteBuildMessage to be visisble in the default logging level, you must set the Importance property to BuildMessageImportance.High.

    Or you can change the verbosity level of the build definition, as Ruiz metnions, but this will create much more noise in the build log.

    Hope that helps
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
    • Marked as answer by nabeelfarid Friday, October 01, 2010 9:14 AM
    Friday, October 01, 2010 7:55 AM
  • Hi Nabeel,

    The default Importanceof WriteBuildMessage is Normal so that the message will not be displayed. When you queue a build, in the parameters tab, set Loggong Verbosity to Diagnostic and then all message will be showed.


    Best regards,
    Ruiz
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    • Marked as answer by nabeelfarid Friday, October 01, 2010 9:14 AM
    Friday, October 01, 2010 3:50 AM
    Moderator

All replies

  • Hi Nabeel,

    The default Importanceof WriteBuildMessage is Normal so that the message will not be displayed. When you queue a build, in the parameters tab, set Loggong Verbosity to Diagnostic and then all message will be showed.


    Best regards,
    Ruiz
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com
    • Marked as answer by nabeelfarid Friday, October 01, 2010 9:14 AM
    Friday, October 01, 2010 3:50 AM
    Moderator
  • If you want the output from WriteBuildMessage to be visisble in the default logging level, you must set the Importance property to BuildMessageImportance.High.

    Or you can change the verbosity level of the build definition, as Ruiz metnions, but this will create much more noise in the build log.

    Hope that helps
    /Jakob


    Blog: http://geekswithblogs.net/jakob Twitter: http://twitter.com/osirisjakob
    • Marked as answer by nabeelfarid Friday, October 01, 2010 9:14 AM
    Friday, October 01, 2010 7:55 AM