Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
MSBuild Reference
 RemoveDir Task
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework General Reference
RemoveDir Task

Updated: November 2007

Removes the specified directories and all of its files and subdirectories.

The following table describes the parameters of the RemoveDir task.

Parameter

Description

Directories

Required ITaskItem[] parameter.

Specifies the directories to delete.

RemovedDirectories

Optional ITaskItem[] output parameter.

Contains the directories that were successfully deleted.

The following example removes the directories specified by the OutputDirectory and DebugDirectory properties. These paths are treated as relative to the project directory.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2005">

    <PropertyGroup>
        <OutputDirectory>\Output\</OutputDirectory>
        <DebugDirectory>\Debug\</DebugDirectory>
    </PropertyGroup>

    <Target Name="RemoveDirectories">
        <RemoveDir
            Directories="$(OutputDirectory);$(DebugDirectory)" />
    </Target>

</Project>

Concepts

Other Resources

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker