How To: Customizing Project File Intellisense in Visual Studio

So Neil pointed out that you can find the MSBuild schemas in either the .NET Framework install path, as well as the Visual Studio install location. The one in the Framework folder ships as a reference (since MSBuild really is part of the .NET redist). The one in the Visual Studio install folder \Program Files\Microsoft Visual Studio 8\xml\Schemas\1033 is used by Visual Studio to provide Intellsense support that we all know and love. 

We have designed our schemas to be extensible so that you can add custom Intellisense for your custom properties, items and tasks. Microsoft.Build.xsd is where you add your customizations. We have commented the file with examples of how to go about adding your own items, properties and tasks to the schema so that you can get Intellisense for your custom types. You could go one step further to keep your definitions separate and more manageable - instead of adding your definitions directly to this file, create a new file (for eg. MyCompany.MSBuildTypes.xsd) and import it into the Microsoft.Build.xsd.

Note that Microsoft.Build.xsd itself is tiny and contains almost no real matter - most of the pre-defined MSBuild types are imported via another schema file i.e. Microsoft.Build.CommonTypes.xsd.

[ Author: Faisal Mohamood ]

Comments (3)

  1. gerard says:

    This is great.

    i am integrating the SDC MSBuild tasks into my build systems, but they do not provide an XSD for their 100 odd tasks.

    If anyone knows about this aspect and if those guys at Microsoft in Reading, UK are providing a schema for their tasks i would love to know, and i suspect many other people.

    The reason i flipped from nant to MSBuild was mainly to get better build support in the first place ironically.


  2. Olivier34 says:

    How do you add MSBuild Extension Pack and/or Community Tasks (from tigris) elements to the standard elements ?

    I did not find any XSD schema for them.

    Thanks in advance,


Skip to main content