Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Deletes the specified files.
The following table describes the parameters of the Delete
task.
Parameter | Description |
---|---|
DeletedFiles |
Optional ITaskItem[] output parameter.Specifies the files that were successfully deleted. |
Files |
Required ITaskItem[] parameter.Specifies the files to delete. |
TreatErrorsAsWarnings |
Optional Boolean parameterIf true , errors are logged as warnings. The defalut value is false . |
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 deletes the file MyApp.pdb
.
<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AppName>MyApp</AppName>
</PropertyGroup>
<Target Name="DeleteFiles">
<Delete Files="$(AppName).pdb" />
</Target>
</Project>