Using an IDE, especially one like VS.NET 2005, has its faults. You get used to intellisense so much that when that little list doesn’t pop up you feel righteous anger. So, one of the first things I did when I started writing custom tasks for MSBuild was to investigate the possibility of adding intellisense for my tasks. And it turns out that it’s a cakewalk.


All you need to do is goto %Program Files%\Microsoft Visual Studio 8\Xml\Schemas\1033 and open up the file Microsoft.Build.xsd. This file has the schema definition for


We will extend this schema and let it know about our tasks as well. This is the basic structure of a task definition.


    <xs:element name="MyTask" substitutionGroup="msb:Task">



                <xs:extension base="msb:TaskType">

                    <xs:attribute name="MyParameter" type="xs:boolean" use="required"/>






Just substitute the name of your task in the xs:element tag and add the parameters that your task supports as xs:attribute tags


Create a separate schema definition file with your custom task descriptions and then include that file in Microsoft.Build.xsd:

<xs:include schemaLocation="MSBuild\MyCustomTasks.xsd"/>


The custom tasks schema file will start like this

<?xml version="1.0" encoding="utf-8"?>

<xs:schema xmlns:msb="" elementFormDefault="qualified" targetNamespace="" xmlns:xs="">

  <xs:include schemaLocation="Microsoft.Build.Core.xsd" />


And that’s it you are done!


In your proj files just ensure that you are using the MSBuild namespace:

<Project xmlns="">


Start typing the name of your custom task and voila!