(转)Generate Email Notifications With MSBuild and Web Deployment Projects

<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

Generate Email Notifications With MSBuild and Web Deployment Projects

If you are not familiar with MSBuild I suggest you take the time to read over the reference  and overview . I use Web Deployment Projects to automate my build process to include the build release type as well as deployments to the testing and staging servers, this in itself is an entire new topic.

Once I completed my build and deployment I previously turned to Outlook and sent an email to the development team notifing them the build has been completed and to be honest this was a process that was easily overlooked and redundant. To overcome this manual process I turned to using a custom MSBuild task. The purpose of this task was to provide an automated mechanism of generating the email to the development team.

First thing is to create a Class Library. This is not any different than any class library with the exception that you reference the Microsoft.Build.Utilities and Microsoft.Build.Framework and your class must inherit Task Class.

Example BuildNotificationByEmail Class:




 

Once you have compiled you assembly simply drop it directly into the folder that contains you web deployment project.

Next open the Web Deployment Project file for editing with Visual Studio 2005 and at the following:

Here is a short snippet of my project file:




 

Now all that remains is to build your web deployment project. Once the build completes suucessfully the email address you defined will recieve an automated email.

<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值