For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.
For the latest documentation on Visual Studio 2017, see RemoveDir Task on docs.microsoft.com. Removes the specified directories and all of its files and subdirectories.
The following table describes the parameters of the
Specifies the directories to delete.
Contains the directories that were successfully deleted.
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 example removes the directories specified by the
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>