This project is read-only.


Most other MSBuild tasks are written as one task per file, e.g. CreateWebsite, ModifyWebsite. This approach can lead to a large amount of duplicated code and with more code, the increased possibility of bugs and higher maintenance cost.

Figure 1. Typical Task Implementation
The MSBuild Extension Pack uses TaskActions for most tasks. TaskActions control the action performed by the task. For example, the same two tasks above are delivered in the IIS7Website task with TaskAction=”Create” and TaskAction=”Modify”.

Figure 2. MSBuild Extension Pack Implementation


In the Help file for the tasks, each task states whether it supports remote execution. If a task supports remote execution, then simply add the MachineName property to the task for that task to execute against the remote machine. If authentication is required, add the UserName and UserPassword properties.

Please Note: various tasks use WMI for remote execution. If a firewall is installed, it may need to be configured to allow WMI to operate.


If an exception makes it through to the base task, only the exception message will be shown. The exception stack will not be logged by default. In order to view the exception stack, either pass in LogExceptionStack="true" to the task, or create an Environment Variable called LogExceptionStack and set its value to true.


By default, the tasks will log messages like any other MSBuild tasks. You may find that you need to suppress logging in some circumstances, possibly for security reasons. If you wish to suppress any message logging for a task, pass in the SuppressTaskMessages="true" task property, or create an Environment Variable called SuppressTaskMessages and set its value to true.
This suppression property has no affect on the logging of warnings or errors.


Figure 3. MSBuild BaseTask Implementation

Last edited Aug 4, 2010 at 7:43 PM by mikeFourie, version 3


No comments yet.