如何自定义 TFS2010 构建以在日志中打印消息
我最近将我的解决方案之一从 SVN+CruiseControl 迁移到 TFS2010。我的构建定义使用默认模板。我想定制模板。由于我从未使用过工作流程,因此我决定首先在构建日志中打印一条简单的消息。为此,我在序列顶部添加了一个 WriteBuildMessage 活动作为其第一个活动,并为其指定了值 Hello World。然而,在保存它、在源代码管理中检查它、排队、完成新构建然后打开构建之后,我在“查看日志”、“摘要”选项卡或 msbuild 日志文件中的任何位置都看不到 Hello World 消息。我尝试将 WriteBuildMessage 活动放在工作流程中的不同位置,但它永远不会被打印。我可以确保我的构建定义指向正确的模板,但它似乎没有打印消息,就好像它从未在工作流程中运行 WriteBuildMessage 活动一样?
我是否遗漏了一些东西,或者 WriteBuildMessage 不是在日志中打印消息的正确活动 有什么想法吗?
问候,
纳比尔
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过 MSDN 论坛弄清楚了
http://social.msdn.microsoft .com/Forums/en/tfsbuild/thread/1a6bbc05-8bd3-40f5-ab38-667214e5fe01
I figure it out via MSDN forums
http://social.msdn.microsoft.com/Forums/en/tfsbuild/thread/1a6bbc05-8bd3-40f5-ab38-667214e5fe01