Partilhar via


ToolTask.DeleteTempFile(String) Method

Definition

Delete temporary file. If the delete fails for some reason (e.g. file locked by anti-virus) then the call will not throw an exception. Instead a warning will be logged, but the build will not fail.

protected:
 void DeleteTempFile(System::String ^ fileName);
protected void DeleteTempFile (string fileName);
member this.DeleteTempFile : string -> unit
Protected Sub DeleteTempFile (fileName As String)

Parameters

fileName
String

File to delete

Remarks

If the delete operation fails for any reason (such as if a file is locked by antivirus software), then this method logs a warning rather than throwing an exception, which would cause the build to fail.

Applies to