共用方式為


ToolTask.HandleTaskExecutionErrors Method

Handles execution errors raised by the executable file.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)

Syntax

'Declaration
Protected Overridable Function HandleTaskExecutionErrors As Boolean
protected virtual bool HandleTaskExecutionErrors()
protected:
virtual bool HandleTaskExecutionErrors()
abstract HandleTaskExecutionErrors : unit -> bool  
override HandleTaskExecutionErrors : unit -> bool
protected function HandleTaskExecutionErrors() : boolean

Return Value

Type: System.Boolean
true if the method runs successfully; otherwise, false.

Remarks

This method is called only if the executable file returns a non-zero exit code.

The return value of this method is used as the return value of the task.

.NET Framework Security

See Also

Reference

ToolTask Class

Microsoft.Build.Utilities Namespace