<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>