开发者

How to customise TFS2010 build to print a message in the log

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 t开发者_开发技巧emplate. 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


I figure it out via MSDN forums

  1. If you want the output from WriteBuildMessage to be visible in the default logging level, you must set the Importance property to BuildMessageImportance.High.
  2. 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, but this will create much more noise in the build log.

http://social.msdn.microsoft.com/Forums/en/tfsbuild/thread/1a6bbc05-8bd3-40f5-ab38-667214e5fe01

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜