Share via

MakeDir task

Creates directories and, if necessary, any parent directories.


The following table describes the parameters of the MakeDir task.

Parameter Description
Directories Required ITaskItem[] parameter.

The set of directories to create.
DirectoriesCreated Optional ITaskItem[] output parameter.

The directories that are created by this task. If some directories couldn't be created, this may not contain all of the items that were passed into the Directories parameter.


In addition to the parameters listed above, this task inherits parameters from the TaskExtension class, which itself inherits from the Task class. For a list of these additional parameters and their descriptions, see TaskExtension base class.


The following code example uses the MakeDir task to create the Output directory at the root of the drive, specified by the OutputDirectory property, and also shows how to create multiple directories, delimited by semicolons, and also how to create the directories using an item @(Folders):


        <Folders Include="FolderA;FolderB;FolderC"></Folders>

    <Target Name="CreateDirectories">

See also